11.32.2 Debugging Application Processes on Windows 2003 Platforms

On a Windows 2003 platform, a graphical debugger is provided as part of the Microsoft Visual C++ environment. For complete information about this tool, refer to the Microsoft Visual C++ reference manual.

To invoke the Microsoft Visual C++ debugger, enter the start command as follows:

start msdev -p process_ID

Note:

For versions of the Microsoft Visual C++ debugger that are earlier than 5.0, enter the start command as follows:
start msdev -p process_id 

To invoke the debugger and automatically enter a process, specify the process name and arguments on the start command line, as follows:

start msdev filename argument 

For example, to invoke the debugger and enter the simpcl.exe process with the ConvertThisString argument, enter the following command:

start msdev simpcl.exe ConvertThisString

When a user-mode exception occurs, you are prompted to invoke the default system debugger to examine the location of the program failure and the state of the registers, stacks, and so on. By default, Dr. Watson is used in the Windows 2003 environment uses as the default debugger for user-mode exception failures, while the kernel debugger is used in the Win32 SDK environment.

To modify the default debugger used by the Windows 2003 system for user-mode exception failures, perform the following steps:

  1. Run regedit or regedt32.
  2. Within the HKEY_LOCAL_MACHINE subtree, navigate to \SOFTWARE\Microsoft\Windows\CurrentVersion\AeDebug
  3. Double-click on the Debugger key to advance into the registry string editor.
  4. Modify the existing string to specify the debugger of your choice.

For example, to request the debugger supplied with the Microsoft Visual C++ environment, enter the following command:

msdev.exe -p %ld -e %ld

Note:

For versions of the Microsoft Visual C++ debugger that are earlier than 5.0, enter the following command:
msvc.exe -p %ld -e %ld