Thursday, October 17, 2013

Suspending a Thread

Suspend a thread to prevent it from running during your debugging session. You might suspend a thread if the thread is about to crash or if you want to prevent it from doing work that could interfere with the rest of your application.
  1. Pause your application’s execution, or wait for it to hit a breakpoint.
  2. In the Debug navigator, Control-click the desired thread.
  3. In the contextual menu, choose Suspend Thread.
    ../art/debug_navigator-suspending_thread-a_2x.png
A suspended thread does not run when you step through your code or continue execution. The debug navigator places a red status icon next to suspended threads.
../art/debug_navigator-suspending_thread-b_2x.png
To resume a thread that is currently suspended, Control-click it and select Resume Thread from the contextual menu.

No comments:

Post a Comment