Marcel Gruber
Marcel Gruber

Reputation: 7485

How to jump to current executing line in XCode debug?

I know you can just press "Step Into" to go to the next line and it will automatically take you to that line if you have wandered off, but what if I don't want to skip the currently executing line? Thanks!

Upvotes: 5

Views: 2050

Answers (1)

George Green
George Green

Reputation: 4905

In the pane on the left hand side (cmd + 0 to show if it's not visible), selected the 6th tab (cmd + 6 to select) which should look like:

Tab icon

In this pane you should now notice that at the bottom there is a list of all the active threads in your application. One (or maybe more) of them will be open showing a stack trace for the thread, like:

Call stack

The top most item in the list is where that thread is currently paused. The line which your breakpoint, is on will be indicated with the breakpoint icon on the left (if you stopped at a breakpoint that is). In the image you can see that I had a breakpoint in -[AppDelegate applicationDidFinishLaunching:]. Simply click on the line of code to jump back to it, you can also easily look back up the call tree to trace bugs from here.

Hope this helps!

Upvotes: 5

Related Questions