|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Debugging Tools for Inspecting Your Program
The primary purpose of any debugger is to display information about the state of the program being debugged and, in some cases, to modify that state. The Visual Studio debugger provides a variety of tools for inspecting and modifying the state of your program. Most of these tools function only in break mode.
One of the least obtrusive tools is the DataTips pop-up information box. When the debugger is in break mode, you can view the value of a variable within the current scope by placing the mouse pointer over the variable in a source window. A DataTips pop-up box appears. To view the value of an expression, select the expression. DataTips pop-up information is not available for expressions outside the current scope, invalid expressions (such as division by zero), or expressions that involve function evaluation. For more information, see Expressions in the Debugger.
Debugger Windows and Dialog Boxes
For more detailed inspection of your program, the Visual Studio debugger provides a variety of windows and dialog boxes.
You can set the numeric format used in the debugger windows to decimal or hexadecimal. For more information, see Changing the Numeric Format of Source Windows.
|Using the Autos Window|| |
|Using the Locals Window|| |
|Using the This (Me) Window|| |
|Using the QuickWatch Dialog Box|| |
|Using the Watch Window|| |
|Using the Registers Window||Register contents|
|Using the Memory Window||Memory contents|
|Using the Call Stack Window|| |
|Using the Disassembly Window||Assembly code generated by the compiler for your program|
|Using the Threads Window||Information on threads (sequential streams of execution) created by your program|
|Using the Modules Window||Modules (DLLs and EXEs) used by your program|
|Running Documents Window||A list of documents, script code, that are loaded into the current process.|
Note Your ability to inspect the program may be limited by whether the program was built with debug information, whether you have access to the program's source code, and whether the common language runtime JIT compiler is tracking debug information. If the Visual Studio debugger does not find debug information for your program, it reports "no matching symbolic information found". Debug information is generated by default when you build the debug configuration of your program. To aid in debugging system calls, you can install system debug symbols. For more information, see Installing System Debug Symbols.