Xcode 4.3 leaving debug after breakpoint - xcode

I am aware of shourtcuts from: Xcode 4 shortcuts but when i'm try to step out after breakpoint and i hit F8 there step into some thread. I don't want to do that. After i saw the infos i want i want to return to my app on the simulator or device and don't want to app stops anywhere. There is a way to completly step out of debug after breakpoint?

Stepping out takes you out of the function you're currently in and moves you to the function that called the function you were in. Stepping out does not resume program execution. Click the Continue button to resume program execution. The Continue button is to the left of the step buttons in Xcode's Debug area.

Related

how can i debug the opening of my application from a file on OSX?

I linked my application to a file extension, so when i double click those files it opens my application. However i experience crash when doing so, and i am looking for a way to breakpoint that and see what's going wrong. I'm using Xcode, it's an OSX app.
Any idea?
lldb doesn't have a "launch with open AppleEvent" feature, so you can't do this directly.
But you can use lldb's "attach wait" feature to catch the app early in startup. You can do this in Xcode by turning on "Wait for the executable to be launched" in the Info tab of the Run scheme of your App target. Then click the Run button, and go to Finder to launch your app by double-clicking on one of its files.
If your system is not heavily loaded, lldb will generally stop the app pretty early in its startup, usually before it gets to handling the open event. Xcode will auto-continue the app, so it should just proceed right to the crash.
If for some reason lldb doesn't attach early enough, edit the main function of your application, and at the very top put in:
int go_on = 0;
while(!go_on) {
sleep(1);
}
That way your app will stall in launching before it handles the open event, giving
lldb time to attach. Once it has attached, Pause the app in the debugger, select the thread and frame containing this main function, go to the lldb Console and do:
(lldb) expr go_on = 1
and then continue. Now your app should finish starting up, handle the open event and crash into the debugger.
As a complement of Jim's answer: If your application is responding to the kAEOpenDocuments event through
- (void)handleAppleEvent:(NSAppleEventDescriptor *)event
withReplyEvent:(NSAppleEventDescriptor *)replyEvent
you can debug your application using Xcode as usual, and set a breakpoint on the line where you start to process that event (or at the beginning if it crashing before reaching that point). Once set up, go to Finder and open the file.
Take into account that when double-clicking it will launch the default app, so if your debug build is not the default one you have to choose "Open With > Other...".

Pause Flutter app in debugger and wait for tap in IntelliJ

I'm trying to debug a Flutter app in the Android emulator by pausing it, tapping on a button and expecting the debugger to take me to the buttons onPressed event handler, where I want to step through the code.
When I tap the button, nothing happens and the debugger doesn't change from paused to running. However, if I resume the app after tapping the button, the onPressed event handler is immediately invoked, so obviously the tap is being picked up by the emulator while the app was paused.
How can I debug my app in this manner, instead of manually finding the correct .dart file and the correct button and inserting a breakpoint?
Unfortunately you cannot do exactly that. Pausing the app prevents the event loop from executing and your button handler is not called. Making it pause in any of your code requires a new feature in which IntelliJ can differentiate between your code and framework code, and stop at any invocation of your code (even then, it should ignore your build() functions). The closest thing to that I could find in IntelliJ is Java method breakpoints, which would not work with Dart.
However, here is one thing you can do: You can set up a breakpoint in the caller of onPressed, which would pause your app on any button press. Here's where you can place that breakpoint:
// This is Line 504 of flutter/lib/src/material/ink_well.dart
// Ctrl+click on button to go into the framework code
// and find this file in project explorer
void _handleTap(BuildContext context) {
_currentSplash?.confirm();
_currentSplash = null;
updateHighlight(false);
if (widget.onTap != null) {
if (widget.enableFeedback)
Feedback.forTap(context);
widget.onTap(); // <---PLACE BREAKPOINT HERE
}
}
Once you hit this breakpoint, click step into (F7) a couple of times and you should get to your onPressed.

Make Xcode 9 Console auto scroll to bottom

My questions is about Xcode 9 IDE.
For some unknown reason, soon after a debug session is started, Console stops auto scrolling to bottom. It stops somewhere in the middle (see screenshot below).
Is there a way to fix this annoying behaviour?
Step 1- Click in the console pane.
Step 2- Hit 'fn' + "→" (The 'End' shortcut on macOS)

Thread 1: breakpoint 7.3 Xcode 7 swift

After I open a certain page of my app, it crashes on the simulator, and shows an error "Thread 1: breakpoint 7.3" in Xcode. When I open this page, it won't even call the viewDidLoad() method... My best guess is that the problem arises from the storyboard because I was trying to implement a search bar before I screwed things over and all the code was working fine. Any suggestions would be helpful
You must have set the breakpoint by mistake.
Breakpoints are useful for debugging. But if you dont require it, you can do one of the follwing
1) you can hit Cmd + Y and rerun project, this will deactivate your breakpoints but won't delete it.
2) Or you can go to project navigator, and click breakpoint navigator and delete all breakpoints
3) You can also see the blue mark on the left side of your code (main editor), that is a breakpoint itself, you can click (two finger click) on the blue breakpoint and delete it.

Xcode is giving me some Thread 1 error, and iOS Simulator is crashing

Whenever I try to run my project (in Xcode 4.6.3), it launces the iPhone Sim., the 'screen' on it goes black, and Xcode displays this same exact thing every time
If anything else such as code of the XIB's I'm using**, I would be more than happy to provide those. Thanks!!
**XIB's I'm using ---- whenever I try to link a button to a view controller (in a .storyboard file) it won't link. I two finger click (right click) and drag, usually, the view controller I want to link will be highlighted in blue, and then I am able to just tap it in the Sim., and it will do a quick animation to the next VC. But it the VC I'm trying to link it doesn't even get highlighted. Once again, I'm running Xcode 4.6.3. Thanks again!!
The picture in your comment says that it crashes when trying to set a key (admissionsButton) for your ViewController object that doesn't exist. This could happen if you deleted a property in code but the IB link still remained. If you open up IB and go to your view controller, expand the utilities window (the right sidebar) and then go to the far right option that shows connections. If there is something there that says admissionsButton, try deleting it.
In order to give you more help than that, I would need to see a more detailed log of where the crash happens.
That message could be for anything during the execution of your code. I would use breakpoints from the moment of launch and step through it using the debugger window.

Resources