Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use for the Step Over Thread and Step Into Thread commands?

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.

like image 574
Guillaume Avatar asked Dec 20 '12 10:12

Guillaume


2 Answers

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.

like image 185
Marek R Avatar answered Oct 06 '22 01:10

Marek R


  • 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

like image 44
user1594895 Avatar answered Oct 05 '22 23:10

user1594895