How to enable a remote kernel debugger connection on a computer that is running Windows Server 2003 with Service Pack 1 (900093)



The information in this article applies to:

  • Microsoft Windows Server 2003 SP1

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

INTRODUCTION

This article discusses how to enable a remote kernel debugger connection on a computer that is running Microsoft Windows Server 2003 with Service Pack 1 (SP1).

MORE INFORMATION

You can remotely initiate a kernel debugging session on a server that is enabled for kernel debugging. You can use a command or a keyboard shortcut to configure a Windows Server 2003-based computer to accept kernel debugging sessions.

Prerequisites

Kernel debugging requires the following two computers:
  • The host computer (the debugger)
  • The destination computer (the server)
The destination computer is effectively locked up when the destination computer breaks into the debugger. The host computer performs the following tasks:
  • Runs the kernel debugger executable.
  • Supports the remote session.
  • Takes control of the server when the server hits a breakpoint.
  • Takes control of the server when the server is manually broken into by pressing CTRL+C.
Use a special five-wire null modem serial cable to connect the host computer to the server. This cable is called a debug cable.

To install the latest debug tools, visit the following Microsoft Web site: After you install the debug tools, restart the server.

How to enable kernel debugging on the server

Method 1: Use a command to enable kernel debugging on the server

  1. Make sure that Windows Server 2003 SP1 is installed on the server.
  2. Add the /debug=disable, noumex switch to the Boot.ini file on the server.

    For more information about how to change the Boot.ini file in Windows Server 2003, click the following article number to view the article in the Microsoft Knowledge Base:

    317526 How to edit the Boot.ini file in Windows Server 2003



    By default, the /debug switch will use COM2 and a baud of 19200 kilobits per second (kbps). To change the baud and COM port settings, add the /baudrate and /debugport switches in the Boot.ini file. For example, type /baudrate=115200 /debugport=com1 in the Boot.ini file.

    The /debug=disable switch will start the system in non-debug mode. However, the COM port will be reserved for future use.

    The noumex switch will disable user mode exception handling by the kernel debugger. To change exception handling for the kernel debugger, use the Kdbgctrl.exe tool.

    Note If the noumex switch is enabled, the !bpid debugger command that lets you to break into the user mode process does not work. To use the !bpid command to break into the user mode process, run the following command to set the user exception handling option to false.
    c:\Debuggers> kdbgctrl -du
  3. On the server, open a command prompt, and then locate the folder where you installed the debug tools. For example, if you installed the debug tools in the root directory of drive C, use the Kdbgctrl.exe tool with the following commands from the C:\Debuggers> command prompt.

    Note To enable the kernel debugger, you can use the -e switch. However, by default, the -e switch is blocked. Type kdbgctrl -eb to enable the kernel debugger enable option.
    CommandExplanation
    -c Check kernel debugger enables
    -ca Check kernel debugger auto-enable
    -cb Check kernel debugger enable block
    -cdb Check kernel DbgPrint buffer size
    -cu Check kernel debugger user exception handling
    -cx Check kernel debugger enable and exit with status
    -d Disable kernel debugger
    -da Disable kernel debugger auto-enable
    -db Disable kernel debugger enable
    -du Disable kernel debugger user exception handling
    -e Enable kernel debugger
    -ea Enable kernel debugger auto-enable
    -eb Enable kernel debugger enable
    -eu Enable kernel debugger user exception handling
    -sdb size Set kernel DbgPrint buffer size
    -td Product ID file Obtain a kernel triage dump file

Method 2: Use a keyboard shortcut to enable kernel debugging on the server

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
  1. Make sure that Windows Server 2003 SP1 is installed on the server.
  2. Add the /debug=disable, noumex switch to the Boot.ini file on the server.
  3. Click Start, click Run, type regedit, and then click OK to start Registry Editor.
  4. Locate and then click the following registry subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters

  5. Create the following registry key:
    Value Type: DWORD
    Value Name: KdEnableOnCtrlSysRq
    Value Data: 1
  6. Restart the server.
  7. To enable the kernel debugging connection, hold down the CTRL key that is located in the lower-right corner, and then press SysRq two times.

Modification Type:MajorLast Reviewed:7/19/2005
Keywords:kbhowto kbtshoot kbmsccsearch kbpubtypekc KB900093 kbAudITPRO