9

Can someone explain what is the purpose of the Step Over Thread and Step Into Thread debugger commands in Xcode? In what case is it useful to use them rather than the usual Step Over and Step Into? What is the difference and when does it matter?

Edit: To clarify the question, I'm not asking about the difference between Step Over/Step Into/Step Out, I'm asking about the difference between the normal and the "Thread" versions, and in what case one version is more useful than the other.

Guillaume
  • 4,331
  • 2
  • 28
  • 31

4 Answers4

9
  • Step Into

Executes the current statement and then stops at the next statement. If the current statement is a function or script call, then the debugger steps into that function or script, otherwise it stops at the next statement.

  • Step Over

Executes the current statement and then stops at the next statement. If the current statement is a function or script call then the debugger executes the whole function or script, and it stops at the next statement after the function call.

  • Step Out

Steps out of the current function and up one level if the function is nested. If in the main body, the script is executed to the end, or to the next breakpoint. The skipped statements are executed, but not stepped through.

Argument is general About debugging so look at

What is the difference between Step Into and Step Over in the Eclipse debugger?

Looking at specific the focus is thread so you can look at your "multithread" application as single thread application without having multiple events/thread etc. running while you are stopped at break point. You have a "stable enviorment".

http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/060-Debug_Your_App/debug_app.html

Community
  • 1
  • 1
user1594895
  • 587
  • 1
  • 10
  • 31
5

I just struggle with the same question. Question is a bit old but it looks like I found the proper answer.

Here in documentation, I found something like that:

Control-Shift to step into or over the active thread only while holding other threads stopped (the step icons show a dashed rather than solid line below the arrow).

Control-Shift-<Fx Key or click> are respective shortcuts for thread versions of step over and step into. So it looks like that this executes only current thread and suspending temporary all other threads. Normal versions continues execution of all not suspended threads.

Jan Rüegg
  • 9,587
  • 8
  • 63
  • 105
Marek R
  • 32,568
  • 6
  • 55
  • 140
2

a very simple explanation of this term:

Step Into, Step Over, Step Out Commands (Debug Menu)

CRDave
  • 9,279
  • 5
  • 41
  • 59
1

According to this book:

Step Over Thread and Step Into Thread freeze all other threads while you advance the thread you're debugging. Hold down Shift and Control while clicking the buttons, or select the commands in the Debug menu, to get the effect.

Jan Rüegg
  • 9,587
  • 8
  • 63
  • 105