In This Book

Environment in Multi-Threaded Applications

When the target program is multi-threaded, the debugger includes a thread component in its concept of environment. (See Chapter 7 for more information on the debugger's general concept of environment.)

For example, the following shows the output from a list environment command during a debugging session on a multi-threaded target program:

list environment

Stopped at: \\file_copy\worker\222 (`thread(3))

Notice the output indicates that the current environment is in Thread 3.

It is useful to invoke the Stack View dialog box when debugging multi-threaded programs. You can invoke it by selecting Show:Stack from the menu bar.

Figure 8-2. Stack View Dialog Box Showing Current Thread

As shown in Figure 8-2 , the Stack View dialog bo x shows the call/return stac k for the current thread. The current thread is the thread that the debugger

8-10 Debugging in Special Situations