Configuring a virtual machine to be debugged with Microsoft Windows Debugger
search cancel

Configuring a virtual machine to be debugged with Microsoft Windows Debugger

book

Article ID: 311099

calendar_today

Updated On:

Products

VMware VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

This article provides steps to configure a virtual machine so it can be debugged from a physical machine running Microsoft Windows Debugger (WinDbg).
Note: You can download Debugging Tools for Windows from the Windows DDK Web site at www.microsoft.com/whdc/devtools/debugging/default.mspx.


Symptoms:

windows-debugging virtual-serial-port

Environment

VMware Workstation 6.x (Linux)
VMware ESX 4.1.x
VMware ESX Server 3.0.x
VMware ESX Server 3.5.x
VMware ESX 4.0.x
VMware Workstation 5.x (Linux)

Resolution

To set up a virtual machine so it can be debugged with Microsoft WinDbg:
  1. In the vSphere Client, right-click the virtual machine and click Edit Settings.
  2. Select the serial port and enter com_1 in the pipe.
  3. Add this line to the virtual machine's boot.ini file to include an option to load the debugger at boot time:

    /debug /debugport=com_1 /baudrate=11520

    For example:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional - Debug" /fastdetect /debugport=com_1 /baudrate=115200


    Note: For Windows Vista, Windows 2008, Windows 7 and later, you need to edit the boot loader with the bcdedit tool.

  4. Reboot the virtual machine and select the new boot.ini option.

  5. On the windows host machine, start the Microsoft WinDbg with the command:

    windbg -b -k com:pipe,port=\\.\pipe\com_1



Additional Information

For information about WinDbg, see the Microsoft article http://msdn.microsoft.com/en-us/library/ff561300.aspx.
Note: The preceding link was validated as of May 9, 2011. If you find the link to be broken, provide feedback on the article and a VMware employee will update the article as necessary.
For information how to set up a virtual serial port for debugging purposes, see Add a Serial Port to a Virtual Machine in the Virtual Machine Administration Guide.