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 an IEEE 1384 cable, also known as a FireWire cable, or use a special null modem serial cable to connect the host computer to the server.
To
install the latest debug tools, visit the following Microsoft Web site:
How to enable kernel debugging on the server
Method 1: Use a command to enable kernel debugging on the server
- Make sure that Windows Server 2003 SP1 is installed on the
server.
- 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 uses COM2 and a baud rate of 19200 kilobits per second
(kbps). To change the baud rate and COM port settings, add the /baudrate and /debugport switches to 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
- 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.
Collapse this tableExpand this table
Command | Explanation |
---|
-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 the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
- Make sure that Windows Server 2003 SP1 is installed on the
server.
- Add the /debug=disable, noumex switch to the Boot.ini file on the server.
- Click Start, click Run,
type regedit, and then click OK to
start Registry Editor.
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters
- Create the following registry key:
Value Type: DWORD
Value Name: KdEnableOnCtrlSysRq
Value Data: 1
- Restart the server.
- 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.