How can I display all the threads for my program when debug in Xcode How can I display all the threads for my program when debug in Xcode xcode xcode

How can I display all the threads for my program when debug in Xcode


Once you run your application the debug area automatically comes up. If it doesen't most likely it's because the visibility of the debug area has been turned off. To turn it on. Toggle the first view control on the top right side of the xcode window and the debug area should appear.

enter image description here

Once you have done that an area like the one in the image below will appear.enter image description here

Click on the show debug navigator button which is the third last in the controls on the debug navigator.On the row immediately after next to the name of your project, there are two buttons, click on the second

enter image description here

and select view process by thread.enter image description here

For the threads to appear your application has to be paused. This can be done by adding a breakpoint at a particular point of the code or manually by clicking the pause button on the debug bar below the source editor. Once paused the threads appear automatically as shown below.enter image description here


You can see the stack traces for each active thread on the debugger view. (Run->Debugger). In the top left panel you should be able to see the stack trace for the current thread. It should say something like "Thread-1" at the top, click on this and you can select any of the other threads, and view their individual stack traces.