BCDEdit /dbgsettings

The /dbgsettings option sets or displays the current global debugger settings for the computer. To enable or disable the kernel debugger, use the BCDEdit /debug option.

Note  Before setting BCDEdit options you might need to disable or suspend BitLocker and Secure Boot on the computer.


bcdedit /dbgsettings SERIAL [DEBUGPORT:port] [BAUDRATE:baud] [/start startpolicy] [/noumex] 

bcdedit /dbgsettings 1394 [CHANNEL:channel] [/start startpolicy] [/noumex] 

bcdedit /dbgsettings USB [TARGETNAME:targetname] [/start startpolicy] [/noumex] 

bcdedit /dbgsettings NET HOSTIP:ip PORT:port [KEY:key] [noddhcp] [newkey] [/start startpolicy] [/noumex] 

Parameters

SERIAL

Specifies that the target machine and the host machine will use a serial connection for debugging. When this option is used, the DEBUGPORT and BAUDRATE parameters can be included as well. For more information, see Setting Up Kernel-Mode Debugging over a Serial Cable Manually.

1394

Specifies that the target machine and the host machine will use an IEEE 1394 (FireWire) connection for debugging. When this option is used, the CHANNEL parameter can be included as well. For more information, see Setting Up Kernel-Mode Debugging over a 1394 Cable Manually.

USB

Specifies that the target machine and the host machine will use a USB 2.0 or USB 3.0 connection for debugging. When this option is used, the TARGETNAME parameter must be included as well. For more information, see:

NET

Specifies that the target machine and the host machine will use an Ethernet network connection for debugging. When this option is used, the HOSTIP and PORT parameters must be included as well. The target computer must have a network adapter that is supported by Debugging Tools for Windows. For more information, see:

BAUDRATE:baud

(Only used when the connection type is SERIAL.) Specifies the baud rate to use. This parameter is optional. Valid values for baud are 9600, 19200, 38400, 57600, and 115200. The default baud rate is 115200 bps.

Note   If the Windows Special Administration Console (SAC) application is running on a target machine that is configured for kernel mode debug through a serial port, the SAC application may cause the debugger connection to drop. This event occurs because the COM port baud value changes after the debugger connection is established. Either close the SAC application before running the debugger or change the debugger COM port baud value to 9600.

CHANNEL:channel

(Only used when the connection type is 1394.) Specifies the 1394 channel to use. The value for channel must be a decimal integer between 0 and 62, inclusive, and must match the channel number used by the host computer. The channel specified in this parameter does not depend on the physical 1394 port chosen on the adapter. The default value for channel is 0.

DEBUGPORT:port

(Only used when the connection type is SERIAL.) Specifies the serial port to use as the debugging port. This is an optional setting. The default port is 1 (COM 1).

HOSTIP:ip

(Only used when the connection type is NET.) For network debugging, specifies the IPv4 address of the host debugger.

KEY:key

For network debugging, specifies the key with which to encrypt the connection. [0-9] and [a-z] allowed only. Do not specify this parameter if you have specified the newkey parameter.

newkey

For network debugging specifies that a new encryption key should be generated for the connection. Do not specify this parameter if you have specified a KEY parameter.

nodhcp

For network debugging prevents use of DHCP to obtain the target IP address.

PORT:port

For network debugging, specifies the port to communicate with on the host debugger. Should be 49152 or higher.

TARGETNAME:targetname

(Only used when the connection type is USB.) Specifies a string value to use for the target name. This string can be any value.

/start startpolicy

This option specifies the debugger start policy. The following table shows the options for the startpolicy.

OptionDescription

ACTIVE

Specifies that the kernel debugger is active.

AUTOENABLE

Specifies that the kernel debugger is enabled automatically when an exception or other critical event occurs. Until then, the debugger is active but is disabled.

DISABLE

Specifies that the kernel debugger is enabled when you type kdbgctrl to clear the enable block. Until then, the debugger is active but is disabled.

 

If a start policy is not specified, ACTIVE is the default.

/noumex

Specifies that the kernel debugger ignores user-mode exceptions. By default, the kernel debugger breaks for certain user-mode exceptions, such as STATUS_BREAKPOINT and STATUS_SINGLE_STEP. The /noumex parameter is effective only when there is no user-mode debugger attached to the process.

Comments

The /dbgsettings option configures the global debugging settings, but does not enable debugging. You must use the /debug option to enable debugging for a specific boot entry. If there are no debugging settings specified for a particular boot entry, the global debug settings are used. To override the global settings, you must use the BCDEdit /set command and specify the ID of the boot entry along with the debug parameter and value pair.

The default values for the global settings are serial communications using COM1, at a baud rate of 115,200.

/dbgsetting parameterDefault value

Connection type

Serial

DEBUGPORT:port

1

BAUDRATE:rate

115200

 

For information about Windows debugging tools, see Windows Debugging. For information about setting up and configuring a kernel-mode debugging session, see Setting Up Kernel-Mode Debugging Manually.

Examples

The following command configures the target computer to use an Ethernet connection for debugging and specifies the IP address of the host computer. The command also specifies a port number that the host computer can use to connect to the target computer. For more information, see Setting Up Kernel-Mode Debugging over a Network Cable Manually.

bcdedit /dbgsettings net hostip:10.125.5.10 port:50000

The following command configures the target computer to use a 1394 connection for debugging. The command also specifies a channel number that the host computer can use to connect to the target computer. For more information, see Setting Up Kernel-Mode Debugging over a 1394 Cable Manually.

bcdedit /dbgsettings 1394 channel:1

The following command configures the target computer to use USB connection for debugging. The command also specifies a target name that the host computer can use to connect to the target computer. For more information, see Setting Up Kernel-Mode Debugging over a USB 3.0 Cable Manually and Setting Up Kernel-Mode Debugging over a USB 2.0 Cable Manually.

bcdedit /dbgsettings usb targetname:myTarget

The following command configures the target computer to use a serial connection for debugging. The command also specifies that the debugging connection will use COM2 and a baud rate of 115,200. For more information, see Setting Up Kernel-Mode Debugging over a Serial Cable Manually.

bcdedit /dbgsettings serial debugport:2 baudrate:115200

See also

Setting Up Kernel-Mode Debugging in Visual Studio
Setting Up Kernel-Mode Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel Debugging in Windows 8

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft