Debugging Tools for Windows

Source Window

The Source window displays source files that have been loaded into the debugger.

Opening the Source Window

The debugger opens a source window when it loads a new source file. To restore or switch to an open Source window, in the WinDbg window, on the Window menu, select the window from the list of windows at the bottom of the menu.

The following figure shows an example of a Source window.

Each source file resides in its own Source window. The title of each Source window is the full path of the source file.

Using the Source Window

Each Source window displays the text of one source file. You cannot edit a source file in the debugger. For more information about changing the font and tab settings, see Changing Text Properties.

To select an entire word or token in a Source window, double-click the word or C++ token.

Shortcut Menu

Each Source window has a shortcut menu with additional commands. To access the menu, right-click the title bar or click the icon that appears near the upper-right corner of the window (). The menu contains the following commands:

Source Window Colors and Hover Evaluation

If the debugger recognizes the source file name extension, the Source window displays certain syntax elements in color. To turn off or change the colors, do the following:

The line that represents the current program counter is highlighted in green. However, if you select a line with the mouse or by using one of the Edit | Go to Xxx commands, the selected line is green and the line that represents the current program counter is not highlighted. Lines at which breakpoints are set are highlighted as well. Enabled breakpoints are highlighted in red and disabled breakpoints are highlighted in yellow. If a breakpoint coincides with the current program counter, it is highlighted in purple.

If you select a Source window and then use the mouse to hover over a symbol in that window, the symbol will be evaluated. The evaluation is the same as that produced by the dt (Display Type) command. To deactivate this evaluation, select Options from the View menu. Then clear the Evaluate on hover check box.

Additional Information

For more information about source debugging and related commands, see Debugging in Source Mode. For more information about docked, tabbed, and floating windows, see Positioning the Windows. For more information about all techniques that you can use to control debugging information windows, see Using Debugging Information Windows.

Build machine: CAPEBUILD