Enabling and disabling threads

When debugging a multithreaded program, it may be necessary to disable a thread and allow the others to run. You do this in the Debug view.

About this task

When the program is suspended, choose the thread you wish to disable, right-click, and choose Disable thread from the pop-up menu. The thread will show a status of (disabled) and it will not run until enabled. You may wish to disable threads that must complete before another thread takes some action. By disabling the other thread you can step through the current thread.

To enable a thread that you have disabled, right-click it and choose Enable thread from the pop-up menu. The thread will return to (suspended) status.

For information about suspending or halting program execution, see the related topic below.

Note: Disabling the main thread or all threads that the main thread is waiting to complete may hang your application. You can use halt to suspend execution and then enable disabled threads to continue.

Feedback