MSDN - Debugging Guide
MSDN - Debugging Guide
Start here for an overview of Debugging Tools for Windows. This tool set includes WinDbg and other
debuggers.
Debugging environments
If your computer has Visual Studio and the WDK installed, then you have six available debugging environments.
For descriptions of these environments, see Debugging Environments.
All of these debugging environments provide user interfaces for the same underlying debugging engine, which
is implemented in the Windows Symbolic Debugger Engine (Dbgeng.dll). This debugging engine is also called
the Windows debugger, and the six debugging environments are collectively called the Windows debuggers.
NOTE
Visual Studio includes its own debugging environment and debugging engine, which together are called the Visual Studio
debugger. For information on debugging in Visual Studio, see Debugging in Visual Studio. For debugging managed code,
such as C#, using the Visual Studio debugger is often the easiest way to get started.
Windows debuggers
The Windows debuggers can run on x86-based, x64-based, or ARM-based processors, and they can debug code
that is running on those same architectures. Sometimes the debugger and the code being debugged run on the
same computer, but other times the debugger and the code being debugged run on separate computers. In
either case, the computer that is running the debugger is called the host computer, and the computer that is
being debugged is called the target computer. The Windows debuggers support the following versions of
Windows for both the host and target computers.
Windows 10 and Windows Server 2016
Windows 8.1 and Windows Server 2012 R2
Windows 8 and Windows Server 2012
Windows 7 and Windows Server 2008 R2
Additional documentation
For additional information related to Debugging Tools for Windows, see Debugging Resources. For information
on what's new in Windows 10, see Debugging Tools for Windows: New for Windows 10.
Download Debugging Tools for Windows
6/16/2021 • 2 minutes to read • Edit Online
The Windows Debugger (WinDbg) can be used to debug kernel-mode and user-mode code, analyze crash
dumps, and examine the CPU registers while the code executes.
To get started with Windows debugging, see Getting Started with Windows Debugging.
Adding the Debugging Tools for Windows if the SDK is already installed
If the Windows SDK is already installed, open Settings , navigate to Apps & features , select Windows
Software Development Kit , and then select Modify to change the installation to add Debugging Tools for
Windows .
Symbol files make it easier to debug your code. The easiest way to get Windows symbols is to use the Microsoft
public symbol server. The symbol server makes symbols available to your debugging tools as needed. After a
symbol file is downloaded from the symbol server it is cached on the local computer for quick access.
This article covers how to get started with Windows Debugging. If your goal is to use the debugger to analyze a
crash dump, see Analyze crash dump files by using WinDbg.
To get started with Windows Debugging, complete the tasks that are described in this article.
Because it is common to stop instruction execution on the processor during debugging, two computer systems
are typically used. In some situations, you might be able to use a virtual machine as the second system. For
example, you might be able to use a virtual PC that is running on the same PC as the code that you need to
debug. However, if your code is communicating to low-level hardware, using a virtual PC may not be the best
approach. For more information, see Setting up network debugging of a virtual machine - KDNET.
6. Configure symbols
To use all of the advanced functionality that WinDbg provides, you must load the proper symbols. If you do not
have symbols properly configured, you will receive messages indicating that symbols are not available when
you attempt to use functionality that is dependent on symbols. For more information, see Symbols for Windows
debugging (WinDbg, KD, CDB, NTSD).
See also
Getting started with WinDbg (kernel-mode)
Getting started with WinDbg (user-mode)
Choosing the 32-Bit or 64-Bit debugging tools
Debugging environments
Setting up debugging (kernel-mode and user-mode)
Debug universal drivers - step by step lab (echo kernel-mode)
Debug drivers - step by step lab (Sysvad kernel-mode)
Getting Started with WinDbg (User-Mode)
6/16/2021 • 6 minutes to read • Edit Online
WinDbg is a kernel-mode and user-mode debugger that is included in Debugging Tools for Windows. Here we
provide hands-on exercises that will help you get started using WinDbg as a user-mode debugger.
For information about how to get Debugging Tools for Windows, see Debugging Tools for Windows (WinDbg,
KD, CDB, NTSD).
After you have installed the debugging tools, locate the installation directories for 64-bit (x64) and 32-bit (x86)
versions of the tools. For example:
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
C:\Program Files (x86)\Windows Kits\10\Debuggers\x86
The symbol search path tells WinDbg where to look for symbol (PDB) files. The debugger needs symbol
files to obtain information about code modules (function names, variable names, and the like).
Enter this command, which tells WinDbg to do its initial finding and loading of symbol files:
.reload
4. To see the symbols for the Notepad.exe module, enter this command:
x notepad!*
Note If you don't see any output, enter .reload again.
To see symbols in the Notepad.exe module that contain main, use the examine symbols command like
this to list modules that match the mask:
x notepad!wWin*
Breakpoint 0 hit
notepad!wWinMain:
00007ff6`6e76b0a0 488bc4 mov rax,rsp
To see a list of code modules that are loaded in the Notepad process, enter this command:
lm
The output is similar to this:
0:000> lm
start end module name
00007ff6`6e760000 00007ff6`6e798000 notepad (pdb symbols)
C:\ProgramData\Dbg\sym\notepad.pdb\BC04D9A431EDE299D4625AD6201C8A4A1\notepad.pdb
00007ff8`066a0000 00007ff8`067ab000 gdi32full (deferred)
00007ff8`067b0000 00007ff8`068b0000 ucrtbase (deferred)
00007ff8`06a10000 00007ff8`06aad000 msvcp_win (deferred)
00007ff8`06ab0000 00007ff8`06ad2000 win32u (deferred)
00007ff8`06b40000 00007ff8`06e08000 KERNELBASE (deferred)
00007ff8`07220000 00007ff8`072dd000 KERNEL32 (deferred)
00007ff8`07420000 00007ff8`07775000 combase (deferred)
00007ff8`07820000 00007ff8`079c0000 USER32 (deferred)
00007ff8`079c0000 00007ff8`079f0000 IMM32 (deferred)
00007ff8`07c00000 00007ff8`07c2a000 GDI32 (deferred)
00007ff8`08480000 00007ff8`085ab000 RPCRT4 (deferred)
00007ff8`085b0000 00007ff8`0864e000 msvcrt (deferred)
00007ff8`08c40000 00007ff8`08cee000 shcore (deferred)
00007ff8`08db0000 00007ff8`08fa5000 ntdll (pdb symbols)
C:\ProgramData\Dbg\sym\ntdll.pdb\53F12BFE149A2F50205C8D5D66290B481\ntdll.pdb
00007fff`f8580000 00007fff`f881a000 COMCTL32 (deferred)
0:000> k
00 000000c8`2647f708 00007ff6`6e783d36 notepad!wWinMain
01 000000c8`2647f710 00007ff8`07237034 notepad!__scrt_common_main_seh+0x106
02 000000c8`2647f750 00007ff8`08e02651 KERNEL32!BaseThreadInitThunk+0x14
03 000000c8`2647f780 00000000`00000000 ntdll!RtlUserThreadStart+0x21
0:011> ~
0 Id: 5500.34d8 Suspend: 1 Teb: 000000c8`262c4000 Unfrozen
1 Id: 5500.3960 Suspend: 1 Teb: 000000c8`262c6000 Unfrozen
2 Id: 5500.5d68 Suspend: 1 Teb: 000000c8`262c8000 Unfrozen
3 Id: 5500.4c90 Suspend: 1 Teb: 000000c8`262ca000 Unfrozen
4 Id: 5500.4ac4 Suspend: 1 Teb: 000000c8`262cc000 Unfrozen
5 Id: 5500.293c Suspend: 1 Teb: 000000c8`262ce000 Unfrozen
6 Id: 5500.53a0 Suspend: 1 Teb: 000000c8`262d0000 Unfrozen
7 Id: 5500.3ca4 Suspend: 1 Teb: 000000c8`262d4000 Unfrozen
8 Id: 5500.808 Suspend: 1 Teb: 000000c8`262da000 Unfrozen
10 Id: 5500.3940 Suspend: 1 Teb: 000000c8`262dc000 Unfrozen
. 11 Id: 5500.28b0 Suspend: 1 Teb: 000000c8`262de000 Unfrozen
12 Id: 5500.12bc Suspend: 1 Teb: 000000c8`262e0000 Unfrozen
13 Id: 5500.4c34 Suspend: 1 Teb: 000000c8`262e2000 Unfrozen
13. To quit debugging and detach from the Notepad process, enter this command:
qd
...
void MyFunction(long p1, long p2, long p3)
{
long x = p1 + p2 + p3;
long y = 0;
y = x / p2;
}
void main ()
{
long a = 2;
long b = 0;
MyFunction(a, b, 5);
}
For this exercise, we will assume that the built application (MyApp.exe) and the symbol file (MyApp.pdb) are in
C:\MyApp\x64\Debug. We will also assume that the application source code is in C:\MyApp\MyApp and that the
target machine compiled MyApp.exe.
1. Open WinDbg.
2. On the File menu, choose Open Executable . In the Open Executable dialog box, navigate to
C:\MyApp\x64\Debug. For File name , enter MyApp.exe. Select Open .
3. Enter these commands:
.symfix
.sympath+ C:\MyApp\x64\Debug
Now WinDbg knows where to find symbols and source code for your application. In this case, the source
code location doesn't need to be set with .srcpath because the symbols have fully qualified paths to the
source files.
4. Enter these commands:
.reload
bu MyApp!main
g
Your application breaks in to the debugger when it comes to its main function.
WinDbg displays your source code and the Command window.
5. On the Debug menu, choose Step Into (or press F11 ). Continue stepping until you have stepped into
MyFunction . When you step into the line y = x / p2 , your application will crash and break in to the
debugger. The output is similar to this:
FOLLOWUP_IP:
MyApp!MyFunction+44 [c:\myapp\myapp\myapp.cpp @ 7]
00007ff6`3be11064 f77c2428 idiv eax,dword ptr [rsp+28h]
FAULTING_SOURCE_LINE: c:\myapp\myapp\myapp.cpp
FAULTING_SOURCE_FILE: c:\myapp\myapp\myapp.cpp
FAULTING_SOURCE_LINE_NUMBER: 7
FAULTING_SOURCE_CODE:
3: void MyFunction(long p1, long p2, long p3)
4: {
5: long x = p1 + p2 + p3;
6: long y = 0;
> 7: y = x / p2;
8: }
9:
10: void main ()
11: {
12: long a = 2;
...
Summary of commands
Contents command on the Help menu
.sympath (Set Symbol Path)
.reload (Reload Module)
x (Examine Symbols)
g (Go)
Break command on the Debug menu
lm (List Loaded Modules)
k (Display Stack Backtrace)
bu (Set Breakpoint)
bl (Breakpoint List)
~ (Thread Status)
~s (Set Current Thread)
.sympath+ (Set Symbol Path) append to existing symbol path
.srcpath (Set Source Path)
Step Into command on the Debug menu (F11 )
!analyze -v
qd (Quit and Detach)
See also
Getting Started with WinDbg (Kernel-Mode)
Debugger Operation
Debugging Techniques
Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)
Debugging Using WinDbg Preview
Getting Started with WinDbg (Kernel-Mode)
6/16/2021 • 8 minutes to read • Edit Online
WinDbg is a kernel-mode and user-mode debugger that is included in Debugging Tools for Windows. Here we
provide hands-on exercises that will help you get started using WinDbg as a kernel-mode debugger.
For information about how to get Debugging Tools for Windows, see Debugging Tools for Windows (WinDbg,
KD, CDB, NTSD). After you have installed the debugging tools, locate the installation directories for 64-bit (x64)
and 32-bit (x86) versions of the tools. For example:
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
C:\Program Files (x86)\Windows Kits\10\Debuggers\x86
Another option for older versions of Windows is to use a direct cable such as USB or serial cable.
For details about how to set up the host and target computers, see Setting Up Kernel-Mode Debugging
Manually.
Virtual Machine - VMs
For information on connecting a debugger to a Hyper-V virtual machine, see Setting Up Network Debugging of
a Virtual Machine - KDNET.
The symbol search path tells WinDbg where to look for symbol (PDB) files. The debugger needs symbol
files to obtain information about code modules (function names, variable names, and the like).
Enter this command, which tells WinDbg to do its initial finding and loading of symbol files:
.reload
5. To see a list of loaded modules, enter this command:
lm
The output is similar to this:
0:000>3: kd> lm
start end module name
fffff800`00000000 fffff800`00088000 CI (deferred)
...
fffff800`01143000 fffff800`01151000 BasicRender (deferred)
fffff800`01151000 fffff800`01163000 BasicDisplay (deferred)
...
fffff800`02a0e000 fffff800`03191000 nt (pdb symbols) C:\...\ntkrnlmp.pdb
fffff800`03191000 fffff800`03200000 hal (deferred)
...
0:000>2: kd> k
Child-SP RetAddr Call Site
ffffd000`224b4c88 fffff800`02d96834 nt!MmCreateProcessAddressSpace
ffffd000`224b4c90 fffff800`02dfef17 nt!PspAllocateProcess+0x5d4
ffffd000`224b5060 fffff800`02b698b3 nt!NtCreateUserProcess+0x55b
...
000000d7`4167fbb0 00007ffd`14b064ad KERNEL32!BaseThreadInitThunk+0xd
000000d7`4167fbe0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
PROCESS ffffe00001e5a900
SessionId: none Cid: 0124 Peb: 7ff7809df000 ParentCid: 0004
DirBase: 100595000 ObjectTable: ffffc000002c5680 HandleCount: <Data Not Accessible>
Image: smss.exe
...
PROCESS ffffe00000d52900
SessionId: 1 Cid: 0910 Peb: 7ff669b8e000 ParentCid: 0a98
DirBase: 3fdba000 ObjectTable: ffffc00007bfd540 HandleCount: <Data Not Accessible>
Image: explorer.exe
15. Copy the address of one process, and enter this command:
!process Address 2
For example: !process ffffe00000d5290 2
The output shows the threads in the process.
16. Copy the address of one thread, and enter this command:
!thread Address
For example: !thread ffffe00000e6d080
The output shows information about the individual thread.
0: kd> !thread ffffe00000e6d080
THREAD ffffe00000e6d080 Cid 0910.0cc0 Teb: 00007ff669a10000 Win32Thread: 0000000000000000 WAIT: ...
ffffe0000089a300 QueueObject
Not impersonating
DeviceMap ffffc000034e7840
Owning Process ffffe00000d52900 Image: explorer.exe
Attached Process N/A Image: N/A
Wait Start TickCount 13777 Ticks: 2 (0:00:00:00.031)
Context Switch Count 2 IdealProcessor: 1
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address ntdll!TppWorkerThread (0x00007ffd14ab2850)
Stack Init ffffd00021bf1dd0 Current ffffd00021bf1580
Base ffffd00021bf2000 Limit ffffd00021bec000 Call 0
Priority 13 BasePriority 13 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
...
17. To see all the device nodes in the Plug and Play device tree, enter this command:
!devnode 0 1
18. To see the device nodes along with their hardware resources, enter this command:
!devnode 0 9
0:000>...
DevNode 0xffffe000010fa770 for PDO 0xffffe000010c2060
InstancePath is "PCI\VEN_8086&DEV_2937&SUBSYS_2819103C&REV_02\3&33fd14ca&0&D0"
ServiceName is "usbuhci"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
TranslatedResourceList at 0xffffc00003c78b00 Version 1.1 Interface 0x5 Bus #0
Entry 0 - Port (0x1) Device Exclusive (0x1)
Flags (0x131) - PORT_MEMORY PORT_IO 16_BIT_DECODE POSITIVE_DECODE
Range starts at 0x3120 for 0x20 bytes
Entry 1 - DevicePrivate (0x81) Device Exclusive (0x1)
Flags (0000) -
Data - {0x00000001, 0x00000004, 0000000000}
Entry 2 - Interrupt (0x2) Shared (0x3)
Flags (0000) - LEVEL_SENSITIVE
Level 0x8, Vector 0x81, Group 0, Affinity 0xf
...
19. To see a device node that has a service name of disk, enter this command:
!devnode 0 1 disk
20. The output of !devnode 0 1 displays the address of the physical device object (PDO) for the node. Copy
the address of a physical device object (PDO), and enter this command:
!devstack PdoAddress
For example: PdoAddress!devstack 0xffffe00001159610
21. To get information about the driver disk.sys, enter this command:
!dr vobj disk 2
Dispatch routines:
[00] IRP_MJ_CREATE fffff8000106d160 CLASSPNP!ClassGlobalDispatch
[01] IRP_MJ_CREATE_NAMED_PIPE fffff80002b0ab24 nt!IopInvalidDeviceRequest
[02] IRP_MJ_CLOSE fffff8000106d160 CLASSPNP!ClassGlobalDispatch
[03] IRP_MJ_READ fffff8000106d160 CLASSPNP!ClassGlobalDispatch
...
[1b] IRP_MJ_PNP fffff8000106d160 CLASSPNP!ClassGlobalDispatch
22. The output of !drvobj displays addresses of dispatch routines: for example,
CLASSPNP!ClassGlobalDispatch. To set and verify a breakpoint at ClassGlobalDispatch, enter these
commands:
bu CL ASSPNP!ClassGlobalDispatch
bl
Enter g to let the target computer run.
If the target computer doesn't break in to the debugger immediately, perform a few actions on the target
computer (for example, open Notepad and save a file). The target computer will break in to the debugger
when ClassGlobalDispatch is called. To see the stack trace, enter these commands:
.reload
k
The output is similar to this:
2: kd> k
Child-SP RetAddr Call Site
ffffd000`21d06cf8 fffff800`0056c14e CLASSPNP!ClassGlobalDispatch
ffffd000`21d06d00 fffff800`00f2c31d volmgr!VmReadWrite+0x13e
ffffd000`21d06d40 fffff800`0064515d fvevol!FveFilterRundownReadWrite+0x28d
ffffd000`21d06e20 fffff800`0064578b rdyboost!SmdProcessReadWrite+0x14d
ffffd000`21d06ef0 fffff800`00fb06ad rdyboost!SmdDispatchReadWrite+0x8b
ffffd000`21d06f20 fffff800`0085cef5 volsnap!VolSnapReadFilter+0x5d
ffffd000`21d06f50 fffff800`02b619f7 Ntfs!NtfsStorageDriverCallout+0x16
...
Summary of commands
Contents command on the Help menu
.sympath (Set Symbol Path)
.reload (Reload Module)
x (Examine Symbols)
g (Go)
dt (Display Type)
Break command on the Debug menu
lm (List Loaded Modules)
k (Display Stack Backtrace)
bu (Set Breakpoint)
bl (Breakpoint List)
bc (Breakpoint Clear)
Step Into command on the Debug menu (F11 )
!process
!thread
!devnode
!devstack
!drvobj
qd (Quit and Detach)
Related topics
Getting Started with WinDbg (User-Mode)
Setting Up KDNET Network Kernel Debugging Automatically
Debugger Operation
Debugging Techniques
Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)
Debugging Using WinDbg Preview
Debugging Environments
3/5/2021 • 4 minutes to read • Edit Online
It is possible to redirect the input and output from NTSD (or CDB) so that it can be controlled from a kernel
debugger (either Visual Studio, WinDbg, or KD). If this technique is used with NTSD, no console window will
appear at all. Controlling NTSD from the kernel debugger is therefore especially useful, since it results in an
extremely light-weight debugger that places almost no burden on the computer containing the target
application. This combination can be used to debug system processes, shutdown, and the later stages of boot
up. See Controlling the User-Mode Debugger from the Kernel Debugger for details.
Related topics
Windows Debugging
Debugging Using WinDbg Preview
Choosing the 32-Bit or 64-Bit Debugging Tools
3/5/2021 • 2 minutes to read • Edit Online
When you install Debugging Tools for Windows, you get both a 32-bit set of tools and a 64-bit set of tools.
If you are using one of the other debugging environments (WinDbg, KD, CDB, or NTSD), you have to make the
choice yourself. To determine which set of debugging tools to use, you need to know the type of processor that
is running on your host computer and whether the host computer is running a 32- or 64-bit version of
Windows.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
Host computer running a 32-bit version of Windows
If your host computer is running a 32-bit version of Windows, use the 32-bit debugging tools. (This situation
applies to both x86-based and x64-based targets.)
x64-based host computer running a 64-bit version of Windows
If your host computer uses an x64-based processor and is running a 64-bit version of Windows, the following
rules apply:
If you are analyzing a dump file, you can use either the 32-bit debugging tools or the 64-bit debugging
tools. (It is not important whether the dump file is a user-mode dump file or a kernel-mode dump file,
and it is not important whether the dump file was made on an x86-based or an x64-based platform.)
If you are performing live kernel-mode debugging, you can use either the 32-bit debugging tools or the
x64 debugging tools. (This situation applies to both x86-based and x64-based targets.)
If you are debugging live user-mode code that is running on the same computer as the debugger, use the
64-bit tools for debugging 64-bit code and 32-bit code running on WOW64. To set the debugger for 32-
bit or 64-bit mode, use the .effmach command.
If you are debugging live 32-bit user-mode code that is running on a separate target computer, use the
32-bit debugging tools.
Related topics
Windows Debugging
Setting Up Debugging (Kernel-Mode and User-
Mode)
3/5/2021 • 2 minutes to read • Edit Online
After you set up kernel-mode debugging, you can use WinDbg, or KD to establish a debugging session. After
you set up user-mode debugging, you can use WinDbg, CDB, or NTSD to establish a debugging session.
Note The Windows debuggers are included in Debugging Tools for Windows. These debuggers are different
from the Visual Studio debugger, which is included with Visual Studio. For more information, see Windows
Debugging.
In this section
Configuring Transports
Setting Up Kernel-Mode Debugging
Supported Target PC NICs
Supported Ethernet NICs for Network Kernel Debugging in Windows 10
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Additional Configuration Tools
Configuring tools.ini
Using KDbgCtrl
Setting Up Kernel-Mode Debugging
3/5/2021 • 2 minutes to read • Edit Online
TIP
The recommended approach is to use network (KDNET) debugging and use the kdnet utility to configure that
automatically. For more information, see Setting Up KDNET Network Kernel Debugging Automatically .
In this section
KDNET
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Virtual Machines
Setting Up Kernel-Mode Debugging of a Virtual Machine Host- KDNET
Setting Up Kernel-Mode Debugging of a Virtual Machine Manually using a COM Port
Single PC
Setting Up Local Kernel Debugging of a Single Computer Manually
Cable Connections
Setting Up Kernel-Mode Debugging over a Serial Cable Manually
Setting Up Kernel-Mode Debugging over a USB 3.0 Cable Manually
Setting Up Kernel-Mode Debugging over a USB 2.0 Cable Manually
Setting Up Kernel-Mode Debugging over a 1394 Cable Manually
Related topics
Setting Up Debugging (Kernel-Mode and User-Mode)
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging
Automatically
6/16/2021 • 7 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a network. This topic describes how to set up
network debugging automatically using the kdnet.exe setup tool.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer. The host computer must be running Windows 7 or later, and the target computer must be
running Windows 8 or later.
...
4.Make a note of the IPv4 address of the network adapter that you intend to use for debugging.
NOTE
These directions assumes that both PCs are running a 64 bit version of Windows on both the target and host. If
that is not the case, the best approach is to run the same "bitness" of tools on the host that the target is running.
For example, if the target is running 32-bit Windows, run a 32 version of the debugger on the host. For more
information, see Choosing the 32-Bit or 64-Bit Debugging Tools.
3. On the host computer, copy the two files to a network share or thumb drive, so that they will be available
on the target computer.
4. On the target computer, create a C:\KDNET directory and copy the kdnet.exe and VerifiedNICList.xml files
to that directory.
IMPORTANT
Before using kdnet.exe to change boot information you may need to temporarily suspend Windows security
features such as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is
complete and appropriately manage the test PC, when the security features are disabled.
5. On the target computer, open a Command Prompt window as Administrator. Enter this command to
verify that the target computer has a supported network adapter.
C:\KDNET>kdnet.exe
Network debugging is supported on the following NICs:
busparams=1.0.0, Broadcom NetXtreme Gigabit Ethernet, Plugged in.
This Microsoft hypervisor supports using KDNET in guest VMs.
6. As the output from kdnet.exe indicates that network adapter on the target is supported, we can proceed.
7. Type this command to set the IP address of the host system and generated a unique connection key. Use
the IP address or the name of the host system. Pick a unique port address for each target/host pair that
you work with, within the recommended range of 50000-50039.
windbg -k -d net:port=<YourDebugPort>,key=<YourKey>
The optional -d parameter shown in the example, enables early break in. For more information, see WinDbg
Command-Line Options.
If you are prompted about allowing WinDbg to access the port through the firewall, allow WinDbg to access the
port for all three of the different network types.
At this point the debugger will be waiting for the target to reconnect and text similar to the following will be
displayed in the debugger command window.
shutdown -r -t 0
Troubleshooting Tips
Debugging application must be allowed through firewall
The debugger must have access through the firewall. Use Control Panel to allow access through the firewall.
1. Open Control Panel > System and Security and select Allow an app through Windows Firewall .
2. In the list of applications, locate Windows GUI Symbolic Debugger and Windows Kernel Debugger.
3. Use the check boxes to allow those two applications all three of the different network types through the
firewall.
4. Scroll down and select OK , to save the firewall changes. Restart the debugger.
Use Ping to test connectivity
If the debugger times out and does not connect, use the ping command on the target PC to verify connectivity.
C:\>Ping <HostComputerIPAddress>
Related topics
Supported Ethernet NICs for Network Kernel Debugging in Windows 10
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Setting Up KDNET Network Kernel Debugging Manually
Getting Started with WinDbg (Kernel-Mode)
Debug Universal Drivers - Step by Step Lab (Echo Kernel-Mode)
Setting Up KDNET Network Kernel Debugging
Manually
3/5/2021 • 16 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a network. This topic describes how to set up
network debugging manually.
IMPORTANT
Setting up a network debugging manually is a complex and error prone process. To set up network debugging
automatically, see Setting Up KDNET Network Kernel Debugging Automatically . Using the KDNET utility is
strongly recommended for all debugger users.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer. The host computer must be running Windows 7 or later, and the target computer must be
running Windows 8 or later.
Debugging over a network has the following advantages compared to debugging over other types of
connectivity.
The host and target computers can be anywhere on the local network.
It is easy to debug many target computers from one host computer.
Given any two computers, it is likely that they will both have Ethernet adapters. It is less likely that they will
both have serial ports or both have 1394 ports.
Network debugging is significantly faster than serial port debugging.
ipconfig
Make a note of the IPv4 address of the network adapter that you intend to use for debugging.
2. On the target computer, open a Command Prompt window and enter the following command, where
YourIPAddress is the IP address of the host computer:
ping -4 <YourIPAddress>
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
3. In an elevated Command Prompt window, enter the following commands, where w.x.y.z is the IP address
of the host computer, and n is a port number of your choice:
bcdedit /debug on
4. bcdedit will display an automatically generated key. Copy the key and store it on a removable storage
device like a USB flash drive. You will need the key when you start a debugging session on the host
computer.
Note We strongly recommend that you use an automatically generated key. However, you can create
your own key as described later in the "Creating Your Own Key" section.
5. Use Device Manager to determine the PCI bus, device, and function numbers for the adapter you want to
use for debugging. These values are displayed in Device Manager under Location on the General tab.
Then in an elevated Command Prompt window, enter the following command, where b, d, and f are the
bus number, device number, and function number of the adapter:
6. The target PC will be rebooted after a kernel debugger is attached. This is described in the next section.
Note If you intend to install the Hyper-V role on the target computer, see Setting Up Network Debugging of a
Virtual Machine Host.
Caution If your target computer is in a docking station, and you have network debugging enabled for a
network adapter that is part of the docking station, do not remove the computer from the docking station. If you
need to remove the target computer from the docking station, disable kernel debugging first. To disable kernel
debugging on the target computer, open a Command Prompt window as Administrator and enter the command
bcdedit /debug off . Reboot the target computer.
windbg -k net:port=<n>,key=<MyKey>
If you are prompted about allowing WinDbg to access the port through the firewall, allow WinDbg to access the
port for all three of the different network types.
Using KD
On the host computer, open a Command Prompt window. Enter the following command, where n is your port
number and MyKey is the key that was automatically generated by bcdedit when you set up the target
computer:
kd -k net:port=<n>,key=<MyKey>
If you are prompted about allowing WinDbg to access the port through the firewall, allow WinDbg to access the
port for all three of the different network types.
shutdown -r -t 0
When the target is restarted, the debugger in the host OS should connect.
After connecting to the target on the host, hit break on your debugger and you can start debugging.
Allowing the debugger through the firewall
When you first attempt to establish a network debugging connection, you might be prompted to allow the
debugging application (WinDbg or KD) access through the firewall. Client versions of Windows display the
prompt, but Server versions of Windows do not display the prompt. You should respond to the prompt by
checking the boxes for all three network types: domain, private, and public. If you do not get the prompt, or if
you did not check the boxes when the prompt was available, you must use Control Panel to allow access
through the firewall. Open Control Panel > System and Security and select Allow an app through
Windows Firewall . In the list of applications, locate Windows GUI Symbolic Debugger and Windows Kernel
Debugger. Use the check boxes to allow those two applications through the firewall. Restart your debugging
application (WinDbg or KD).
Encryption key
To keep the target computer secure, packets that travel between the host and target computers must be
encrypted. We strongly recommend that you use an automatically generated encryption key (provided by
bcdedit when you configure the target computer). Network debugging uses a 256-bit key that is specified as
four 64-bit values, in base 36, separated by periods. Each 64-bit value is specified by using up to 13 characters.
Valid characters are the letters a through z and the digits 0 through 9. Special characters are not allowed.
To specify your own key, open an elevated Command Prompt window on the target computer. Enter the
following command, where w.x.y.z is the IP address of the host computer, and n is your port number, and Key is
your key:
The target computer needs to be rebooted anytime the dbgsettings are changed.
Troubleshooting Tips
Debugging application must be allowed through firewall
When you first attempt to establish a network debugging connection, you might be prompted to allow the
debugging application (WinDbg or KD) access through the firewall. Client versions of Windows display the
prompt, but Server versions of Windows do not display the prompt. You should respond to the prompt by
checking the boxes for all three network types: domain, private, and public. If you do not get the prompt, or if
you did not check the boxes when the prompt was available, you must use Control Panel to allow access
through the firewall. Open Control Panel > System and Security and select Allow an app through
Windows Firewall . In the list of applications, locate Windows GUI Symbolic Debugger and Windows Kernel
Debugger. Use the check boxes to allow those two applications through the firewall. Scroll down and select OK ,
to save the firewall changes. Restart the debugger.
Port number must be in range allowed by network policy
The range of port numbers that can be used for network debugging might be limited by your company's
network policy. To determine whether your company's policy limits the range of ports that can be used for
network debugging, check with your network administrator. On the target computer, open a Command Prompt
window as Administrator and enter the command bcdedit /dbgsettings . The output will be similar to this.
After changing the target machine debugger settings, rerun the debugger on the host machine with the new
port setting, and then reboot the target computer.
Use Ping to test connectivity
If the debugger does not connect use the ping command on the target PC to verify connectivity.
C:\>Ping <HostComputerIPAddress>
Note that this may not work if your host computer is not configured to be discoverable on the network, since
the firewall may block ping requests, and because of this, you will not get any responses when you ping the
host.
How the Debugger Obtains an IP Address for the Target Computer
KDNET on the target computer attempts to use Dynamic Host Configuration Protocol (DHCP) to get a routable
IP address for the network adapter that is being used for debugging. If KDNET obtains a DHCP-assigned
address, then the target computer can be debugged by host computers located anywhere on the network. If
KDNET fails to obtain a DHCP-assigned address, it uses Automatic Private IP Addressing (APIPA) to obtain a local
link IP address. Local link IP addresses are not routable, so a host and target cannot use a local link IP address to
communicate through a router. In that case, network debugging will work if you plug the host and target
computers into the same network hub or switch.
Always specify busparams when setting up KDNET on a physical machine with a PCI based NIC
If you are setting up KDNET on a physical machine with a PCI or PCIe based NIC, you should always specify the
busparams for the NIC you want to use for KDNET. To specify the bus parameters, Open Device Manager, and
locate the network adapter that you want to use for debugging. Open the property page for the network adapter
and make a note of the bus number, device number, and function number that are displayed under Location on
the General tab. In an elevated Command Prompt Window, enter the following command, where b, d, and f are
the bus, device and function numbers in decimal format:
When the debugger is running on the host machine, and waiting to connect, reboot the target computer, using
this command.
shutdown -r -t 0
When you delete the hostip, you need to specify target= on the debugger command line.
3. As another example, delete the port entry using this command.
When you delete the port entry, KDNET will use the default ICANN registered debugger port of 5364.
Hyper-V
Setting up Hyper-V
If you intend to install the Hyper-V role on the target computer, see Setting Up Network Debugging of a Virtual
Machine Host.
For information on debugging a hyper-v Virtual Machine (VM), see Setting Up Network Debugging of a Virtual
Machine - KDNET.
Enabling KDNET on a hyper-v host that is running VMs with external network connectivity
There is a specific situation, which is not uncommon, which will cause networking in VMs to stop working:
Hyper-V has been enabled on the PC, an external networking switch has been created and is pointed at a
physical NIC in the machine, and VMs have been configured to use that external switch for their
networking.
KDNET is then enabled on the hyper-v host OS using the same physical NIC that is pointed to by the
external networking switch, and the host is rebooted.
All of the VMs that were using the previously configured external switch, lose their network connectivity
after the reboot.
This is by design, and happens because KDNET takes exclusive control over the NIC it is configured to use, and
the native NDIS miniport for that NIC is not loaded by the OS. When this occurs, the external networking switch
can no longer communicate with the native NDIS miniport driver, and will stop working. To work around this
situation, do the following:
1. Open the Virtual Switch Manager from Hyper-V Manager, select your existing Virtual Switch, and change
the external network NIC to the Microsoft Kernel Debug Network Adapter by selecting it from the drop
down box and then selecting OK in the Virtual Switch Manager dialog box.
2. After updating your Virtual Switch NIC, shutdown and restart your VMs.
When KDNET debugging is turned off, the same procedure will need to be followed to repoint the external
switch back to the native NDIS miniport for the NIC. Otherwise VM connectivity will be lost when the machine is
rebooted after debugging is disabled.
IPv6
IPv6 support was added in Windows version 1809.
To use IPv6 with the debugger complete these steps.
1. Ping your <debughostname> and note the IPv6 address that is reported on the Reply from output
lines.Use this IPv6 address in place of x:y:z:p:d:q:r:n below.
2. Use BCDEdit to delete any existing ip address values in dbgsettings.
3. Set the IPv6 address of the host. There must not be any spaces in the hostipv6=s:t:u:v:w:x:y:z string. is
is the network port number to use for this target machine, <YourKey> is the four part security key, and
<b.d.f> are the bus device function location numbers for the NIC you want to use for KDNET.
4. Type this command to confirm that the dbgsettings are set properly.
Windbg -k net:port=<yournetworkportnumber>,key=<key_output_from_kdnet>,target=::<YourIPv6Address>
6. When the debugger is running on the host machine, and waiting to connect, reboot the target computer.
7. The debugger should connect to the host debugger early during boot. You will know that KDNET is using
an IPv6 connection because the IP addresses reported in the connected message will be IPv6 addresses
instead of IPv4 addresses.
NOTES
Every debugger bcd setting that allows the hostip to be specified has a corresponding hostipv6 element.
There are three.
IP V4 IP V6 USA GE
If you set the hostipv6 style address for any of those kinds of debugging, it means you want and will get
IPv6.
If you set the hostip style address for any of those kinds of debugging, it means you want and will get
IPv4.
The target will only do IPv4 or IPv6, not both at the same time. Which version of the IP protocol is used is
controlled by the target machine dbgsettings. If hostip is set, the target will use IPv4. If hostipv6 is set, the
target will use IPv6.
The host debugger will normally auto select use of IPv4 or IPv6. By default the debugger listens on both
an IPv4 socket and an IPv6 socket, and connects automatically on either one to the target machine.
If you want to force use of IPv6 in the debugger on the host, but you want the debugger to listen for a
connection from the target, then you can add, target=:: to the debugger command line. :: is an IPv6
address of 0.
If you want to force IPv4 debugging in the debugger on the host, but you want the debugger to listen for
a connection from the target, then you can add, target=0.0.0.0 to the debugger command line. 0.0.0.0 is
an IPv4 address of 0.
If you specify, target= on the debugger command line and use a machine name, the debugger will
convert that machine name into an IPv4 address and an IPv6 address, and will attempt to connect on
both.
If you specify, target= on the debugger command line, and use an IP address, if the IP address contains
any contains any : characters, the debugger will assume it is an IPv6 address, and will force use of IPv6 for
that connection. If the IP address contains any . characters, the debugger will assume it is an IPv4 address,
and will force use of IPv4 for that connection.
If you setup IPv6 on the target, and force use of IPv4 on the debugger command line, you will not get a
connection.
If you setup IPv4 on the target, and force use of IPv6 on the debugger command line, you will also not get
a connection.
Related topics
Setting Up KDNET Network Kernel Debugging Automatically
Supported Ethernet NICs for Network Kernel Debugging in Windows 10
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Setting Up Network Debugging of a Virtual
Machine - KDNET
3/5/2021 • 6 minutes to read • Edit Online
This topic describes how to configure a kernel debugging connection to a Hyper-V virtual machine (VM).
O P T IO N VA L UE
VLAN ID Disabled
...
...
...
3. Record the IPv4 address of the External Virtual Switch that will be used as the host address for
debugging.
4. To confirm connectivity between the target and the host computer, open an elevated command prompt
window on the target computer, and enter the following command, where YourHostIPAddress is the IP
address of the host computer.
ping -4 <YourHostIPAddress>
NOTE
These directions assumes that both PCs are running a 64 bit version of Windows on both the target and host. If that is
not the case, the best approach is to run the same "bitness" of tools on the host that the target is running. For example, if
the target is running 32 bit Windows, run a 32 version of the debugger on the host. For more information, see Choosing
the 32-Bit or 64-Bit Debugging Tools.
2. To allow the long key that is used to be cut and pasted, enable enhanced session support. In the VM
window, from the View pull down menu, enable Enhanced session.
3. On the target VM computer, create a C:\KDNET directory and copy the kdnet.exe and VerifiedNICList.xml
files to that directory.
4. On the target computer, open a Command Prompt window as Administrator. Enter this command to
verify that the target computer has a supported network adapter.
C:\KDNET>kdnet
5. Type this command to set the IP address of the host system and generated a unique connection key. Use
the IP address of the host system you recorded earlier. Pick a unique port address for each target/host
pair that you work with, with in the range 50000-50039. For this example, we will select 50005.
To debug this vm, run the following command on your debugger host machine.
windbg -k net:port=50005,key=3u8smyv477z20.2owh9gl90gbxx.3sfsihzgq7di4.nh8ugnmzb4l7
6. Use CRTL+C to copy the provided windbg output into the command buffer. Doing this avoids attempting
to write down the long key value that is returned.
7. Re-enable BitLocker and secure boot when you're done configuring the debugger settings.
8. Because a VM with enhanced session support can timeout when it is left in a breakpoint, disable
Enhanced session support using the View pull down menu in the VM.
9. The VM will be restarted after the debugger is loaded and running. This process is described next.
C:\Debuggers\windbg -k net:port=<YourDebugPort>,key=<YourKey>
When you first attempt to establish a network debugging connection, you might be prompted to allow the
debugging application (WinDbg or KD) access through the firewall. You should respond to the prompt by
checking the boxes for all three network types: domain, private, and public.
shutdown -r -t 0
When the target virtual machine is restarted, the debugger in the host OS should connect.
After connecting to the VM, hit break on your debugger and you can start debugging.
To support the debugging connection a Kernel Debug Network Adapter is added and visible in network
properties, after the VM is rebooted.
Troubleshooting KDNET Virtual Machine Network Debugging
If the debugger does not connect, use the ping command from the target VM to verify connectivity.
C:\>Ping <HostComputerIPAddress>
Related topics
Setting Up Kernel-Mode Debugging of a Virtual Machine Manually using a Virtual COM Port
Setting Up a Network Connection Manually
Setting Up Kernel-Mode Debugging of a Virtual
Machine Manually using a Virtual COM Port
3/5/2021 • 5 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging of a virtual machine. The virtual machine can be
located on the same physical computer as the debugger or on a different computer that is connected to the
same network. This topic describes how to set up debugging of a virtual machine manually using a virtual COM
Port via KDCOM.
Using KDNET virtual networking is a faster option and is recommended. For more information, see Setting Up
Network Debugging of a Virtual Machine with KDNET.
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
1. In the virtual machine, in an elevated Command Prompt window, enter the following commands.
bcdedit /debug on
bcdedit /dbgsettings serial debugpor t:n baudrate:115200
where n is the number of a COM port on the virtual machine.
2. In the virtual machine, configure the COM port to map to a named pipe. The debugger will connect
through this pipe. For more information about how to create this pipe, see your virtual machine's
documentation.
3. Start the debugger in elevated mode, for example from an administrator command prompt. The
debugger must be running in elevated mode when debugging a VM over a serial pipe. Once the
debugger is attached and running, reboot the target VM.
Parameters
VMHost
Specifies the name of the computer that the virtual machine is running on.
PipeName
Specifies the name of the pipe that you created on the virtual machine.
resets=0
Specifies that an unlimited number of reset packets can be sent to the target when the host and target are
synchronizing. Use the resets=0 parameter for Microsoft Virtual PC and other virtual machines whose pipes
drop excess bytes. Do not use this parameter for VMware or other virtual machines whose pipes do not drop all
excess bytes.
reconnect
Causes the debugger to automatically disconnect and reconnect the pipe if a read/write failure occurs.
Additionally, if the debugger does not find the named pipe when the debugger is started, the reconnect
parameter causes the debugger to wait for a pipe that is named PipeName to appear. Use reconnect for Virtual
PC and other virtual machines that destroy and re-create their pipes during a computer restart. Do not use this
parameter for VMware or other virtual machines that preserve their pipes during a computer restart.
For more information about additional command-line options, see KD Command-Line Options or WinDbg
Command-Line Options .
Remarks
If the target computer has stopped responding, the target computer is still stopped because of an earlier kernel
debugging action, or you used the -b command-line option, the debugger breaks into the target computer
immediately.
Otherwise, the target computer continues running until the debugger orders it to break.
Related topics
Setting Up Network Debugging of a Virtual Machine with KDNET
Setting Up Kernel-Mode Debugging Manually
Setting Up Network Debugging of a Virtual Machine Host
Setting Up Local Kernel Debugging of a Single
Computer Manually
3/5/2021 • 2 minutes to read • Edit Online
Debugging Tools for Windows supports local kernel debugging. This is kernel-mode debugging on a single
computer. In other words, the debugger runs on the same computer that is being debugged. With local
debugging you can examine state, but not break into kernel mode processes that would cause the OS to stop
running.
The local bcdedit option is available in Windows 8.0 and Windows Server 2012 and later.
Related topics
Local Kernel-Mode Debugging
Setting Up Kernel-Mode Debugging Manually
Setting Up Kernel-Mode Debugging over a Serial
Cable Manually
3/5/2021 • 4 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a null-modem cable. Null-modem cables are
serial cables that have been configured to send data between two serial ports. Do not confuse null-modem
cables with standard serial cables. Standard serial cables do not connect serial ports to each other. For
information about how null-modem cables are wired, see Null-Modem Cable Wiring.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
1. On the target computer, open a Command Prompt window as Administrator, and enter the following
commands, where n is the number of the COM port used for debugging on the target computer, and rate
is the baud rate used for debugging:
bcdedit /debug on
bcdedit /dbgsettings serial debugpor t:n baudrate:rate
Note The baud rate must be the same on the host computer and target computer. The recommended
rate is 115200.
2. Reboot the target computer.
2 3 Tx - Rx
3 2 Rx - Tx
7 8 RTS - CTS
8 7 CTS - RTS
5 5 Signal ground
25-pin connector
C O N N EC TO R 1 C O N N EC TO R 2 SIGN A L S
2 3 Tx - Rx
3 2 Rx - Tx
4 5 RTS - CTS
5 4 CTS - RTS
6 20 DSR - DTR
20 6 DTR - DSR
7 7 Signal ground
Signal Abbreviations
A B B REVIAT IO N SIGN A L
Tx Transmit data
Rx Receive data
CD Carrier detect
Additional Information
For complete documentation of the bcdedit command, see BCDEdit Options Reference.
Related topics
Setting Up Kernel-Mode Debugging Manually
Setting Up 2PF Kernel-Mode Debugging using
KDNET
6/16/2021 • 13 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a network cable using multiple Physical
Functions (PFs) on the supported NICs by partitioning the PCI configuration space.
With 2PF debugging, each PF can be connected to a single network port, so it allows the kernel debugging
functionality to be connected to one PF while the standard network stack talks to the other PF. Because of this,
KDNIC doesn't need to route the Windows networking traffic via KDNET, and KDNET will only be responsible to
route the host kernel debugger traffic. This results in a dramatic performance increase.
This topic describes how to set up 2PF debugging using the kdnet.exe utility.
Network card vendors are encouraged to enable support for this feature. For more information, see Debugger
2PF KDNET Miniport Network Driver Support.
Two drivers will run over the partitioned PCI configuration space
The Windows inbox driver will run out of the primary network port at bus.dev.fun0.0 PCI location.
The KDNET-Ext. module will run out of the added PF at bus.dev.fun0.1 , This technique ensures that the
Windows inbox NIC driver does not get impacted by sharing the NIC with KDNET.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
3. On the host computer, copy the two files to a network share or thumb drive, so that they will be available
on the target computer.
4. On the target computer, create a C:\KDNET directory and copy the kdnet.exe and VerifiedNICList.xml files
to that directory.
5. On the target computer, open a Command Prompt window as Administrator. Enter this command to
verify that the target computer has a supported network adapter and to view the busparams value.
C:\KDNET>kdnet.exe
Because the output shown above, does not include "KDNET is running on this NIC.", this indicates that
traditional KDNET debugging is not enabled on any of the adapters.
If the NIC does not support the multiple PF feature, then the PF status notification of "multiple physical
functions are supported" will be omitted (blank) from the displayed information.
If NIC supports multiple PF, then the actual displayed information will depend on the combination of the
Network port (root port/PF added port), as well as cable connected/disconnected status to/from the NIC
physical port.
This table summarizes different PF notifications for the primary NIC.
N IC A DA P T ER B US. DEV. F UN
C O RRESP O N DS TO C A B L E STAT US P F STAT US
N IC A DA P T ER B US. DEV. F UN
C O RRESP O N DS TO C A B L E STAT US P F STAT US
new (secondary) PF port cable disconnected or unknown Primary function, multiple physical
status functions are enabled, but
secondary function is not used
6. If the output from kdnet.exe indicates that a supported NIC controller is available, we can proceed.
Setting Up the Target Computer for 2PF
Use the kdnet.exe utility to configure the debugger settings on the target PC for 2PF, by following these steps.
IMPORTANT
Before using bcdedit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. You can re-enable Bit Locker and Secure Boot once you’re done using
BCDEdit to update the boot information. Appropriately manage the test PC, when the security features are disabled.
This process will adds a new physical function (PF) to the a NIC, specified by bus.device.function . The new PF
can be used only by KDNET, since the Windows inbox driver is set up to not run on an added, secondary PF.
Follow these steps to add a new PF that will be used by the debug device.
Confirm that debugging is disabled before adding the new physical function
1. Use the BCDEdit command to confirm that the KD is disabled on the target before adding a new PF on the
NIC. This is needed to make sure the standard vendor NIC driver is loaded so that it can be used to add the
new PF.
debug No
As an alternative, use kdnet.exe with out parameters to see if debugging is enabled. The output below, shows
KDNET running on a system with debugging enabled on one NIC. This is the lower performance legacy setup.
c:\Debuggers>kdnet
2. If the debug value is set to Yes, use the set command to disable debugging.
After the target PC restarts, and debugging is disabled, we can add the new physical function.
Add the new physical function
1. Open an elevated command prompt and run the following command to add a second PF. All values are
provided using decimal values.
C:\KDNET> kdnet -addpf 141.0.0 198.51.100.1 50001
Succeeded adding a Pci PF on :141.0.1. Please power off or reboot the machine.
To debug this machine, run the following command on your debugger host machine.
windbg -k net:port=50001,key=2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
Then reboot this machine by running shutdown -r -t 0 from this command prompt.
bus.dev.fun is the PCI location port of the NIC adapter that supports the multiple PF feature, so the new PF will
be added/attached to this network device.
-addpf option enables automatically kernel debugging over KDNET transport on the added PF port.
[host name/host ip address] is the TCP/IP address of the host computer. Use the ipconfig command on the
host computer to determine this address.
[port number] is the TCP/IP port number. You can choose any port number from 49152 through 65535. The
recommended range is between 50000 and 50039. The port that you choose will be opened for exclusive access
by the debugger running on the host computer. Pick a unique port address for each target/host pair that you
work with, within the recommended range of 50000-50039. 50005 is shown in the example.
Note that -addpf will also add the NO_KDNIC attribute to the OS installation {default} loadoptions. This is because
KDNIC is no longer required to run on top of KDNET.
The loadoptions = NO_KDNIC is added to {default} OS tag to ensure that kdnic.sys won't run out of the new
added pf (141.0.1)
Use the bcdedit command to confirm that NO_KDNIC has been set.
C:\KDNET> bcdedit /enum {default}
```console
C:\KDNET> bcdedit /dbgsettings
busparams 141.0.1
key 2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
debugtype NET
hostip 198.51.100.1
port 50001
dhcp Yes
The operation completed successfully.
3. Copy the returned key into a notepad .txt file. In the example shown, the generated key has a value of:
2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
4. Optionaly use kdnet.exe to confirm that the multiple physical functions are enabled.
C:\KDNET> kdnet.exe
kd> .kdtargetmac
Force unload of kdnet.dll
ModLoad: fffff800`18510000 fffff800`18557000 kdnet.dll
Loading symbols for fffff800`18510000 kdnet.dll -> kdnet.dll
...
Base MAC: 98039baa757c 4
Find the MAC address field. Calculate the KDNET 2PF MAC address value by sequentially adding one to the last
digit of the root MAC device. So for the root device with and address of 98039baa757c , the KDNET 2PF device
would have an address of 98039baa757d .
Where bus.dev.fun is the PCI location port of the NIC adapter where the PF was originally attached. This is the
same PCI location originally passed to kdnet -addpf.
Using the -removepf option also re-enables kernel debugging over KDNET on the original bus.dev.fun.
Succeeded removing a Pci PF on :141.0.0. Please power off or reboot the machine.
The kdnet.exe -removepf command also will remove the NO_KDNIC attribute from the OS installation {default}
loadoptions, since KDNET will be enabled on the original bus.dev.fun, that is the dbgsettings::busparams will
point to the original network port. This will cause KDNIC to be used again, providing a network connection again
on top of KDNET.
Once the PF is removed the machine needs to be rebooted for the BCD changes to be applied.
shutdown -r -t 0
Device Name:\\.\Mlx5Util
Pci Bus:28.0.0
The PCI PF is already configured on this por t : Error=(0x80004004) Failed PF operation on the debug
device. The debug device is not configured for KDNET.
Do not add/remove again a PF on the root port where it is already added as a PF.
Common error messages - removing a PF
Device Name:\\.\Mlx5Util
Pci Bus:28.0.1
Adapter is not active : Error=(0x80070002) Failed PF operation on the debug device. The debug device is not
configured for KDNET
Do not use an added PF port with the “-removepf/-addpf” command line parameter, because any operation
on the added PF port will result in a failure (error: Adapter is not active on port), since the vendor NIC inbox
driver is set up to expressly not run on an added PF.
Both command line options (-addpf/-removepf) must be used only on the root PCI device.
Device Name:\\.\Mlx5Util
Pci Bus:28.0.0
There is no PCI PF to remove on this por t : Error=(0x80004005) Failed PF operation on the debug device.
The debug device is not configured for KDNET
If you add a new PF and then decide to remove it w/o rebooting it will result in a failure, since the vendor NIC
firmware requires a rebooting/resetting the NIC HW before it can recognize the new added PF.
Common error messages - BCDEdit
NO_KDNIC is not present in the BCD OS {default} installation.
It is not recommended to use bcdedit.exe to modify/change the debug device (dbgsettings) after adding a
new PF. The kdnet -addpf/removepf command line options will configure the debug device and will also
add/remove automatically the NO_KDNIC token to/from the {default}::loadoptions .
Related topics
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Setting Up Kernel-Mode Debugging over a USB 3.0 Cable Manually
Setting Up Kernel-Mode Debugging Manually
Setting Up Kernel-Mode Debugging over USB EEM
on an ARM device using KDNET
6/16/2021 • 4 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a USB cable using EEM on an ARM device. This
topic describes how to set up USB EEM on an ARM device using the kdnet.exe utility.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
3. On the host computer, copy the two files to a network share or thumb drive, so that they will be available
on the target computer.
4. On the target computer, create a C:\KDNET directory and copy the kdnet.exe and VerifiedNICList.xml files
to that directory.
5. On the target computer, open a Command Prompt window as Administrator. Enter this command to
verify that the target computer has a supported network adapter and to view the busparams value.
C:\KDNET>kdnet.exe
6. As the output from kdnet.exe indicates that a supported USB controller with a busparams value of 1 is
available, we can proceed.
Setting Up the Target Computer
Use the kdnet.exe utility to configure the debugger settings on the target PC, by following these steps.
IMPORTANT
Before using bcdedit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. You can re-enable Bit Locker and Secure Boot once you’re done using
BCDEdit to update the boot information. Appropriately manage the test PC, when the security features are disabled.
1. Use the command shown below to set the, busparams value, the IP address and the port of the host
system and generated a unique connection key. The 169.254.255.255 IP address is used for all USB EMM
connections.
2. Pick a unique port address for each target/host pair that you work with, within the recommended range
of 50000-50039. 50005 is shown in the example.
3. Copy the returned key into a notepad .txt file. In the example shown, the generated key has a value of:
2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
4. Use the BCDEdit command to check that the parameters are as expected. For more information, see
BCDEdit /dbgsettings
C:\>bcdedit /dbgsettings
busparams 1
key 2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
debugtype NET
hostip 169.254.255.255
port 50005
dhcp No
The operation completed successfully.
Troubleshooting Target
Confirm that the Windows KDNET-USB-EMM Network Adapter is present under Network Adapters in Windows
Device Manager.
The device properties show when the controller is reserved for use by the Windows kernel debugger.
Troubleshooting Host
Confirm that the Windows KDNET-USB-EMM Network Adapter is present under Network Adapters in Windows
Device Manager.
On the host the KDNET-EEM connection using the USB Type A port is shown.
Related topics
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Setting Up Kernel-Mode Debugging over a USB 3.0 Cable Manually
Setting Up Kernel-Mode Debugging Manually
Setting Up Kernel-Mode Debugging over a USB 3.0
Cable Manually
3/5/2021 • 6 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a USB 3.0 cable. This topic describes how to set
up USB 3.0 debugging manually.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
Debugging over a USB 3.0 cable requires the following hardware:
A USB 3.0 debug cable. This is an A-A crossover cable that has only the USB 3.0 lines and no Vbus.
On the host computer, an xHCI (USB 3.0) host controller
On the target computer, an xHCI (USB 3.0) host controller that supports debugging
[Port1]
4. Make a note of the bus, device, and function numbers for the xHCI controller that you intend to use for
debugging. UsbView displays these number. In the following example, the bus number is 48, the device
number is 0, and the function number is 0.
5. After you have identified an xHCI controller that supports debugging, the next step is to locate the
physical USB connector that is associated with a port on the xHCI controller. To find the physical
connector, plug any USB 3.0 device into any USB connector on the target computer. Refresh UsbView to
see where your device is located. If UsbView shows your device connected to your chosen xHCI host
controller, then you have found a physical USB connector that you can use for USB 3.0 debugging.
IMPORTANT
Before using bcdedit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. You can re-enable Secure Boot once you’re done debugging and you’ve
disabled kernel debugging.
6. On the target computer, open a Command Prompt window as Administrator, and enter these commands:
bcdedit /debug on
bcdedit /dbgsettings usb targetname:TargetName
where TargetName is a name that you create for the target computer. Note that TargetName does not
have to be the official name of the target computer; it can be any string that you create as long as it
meets these restrictions:
The string must not contain “debug” anywhere in the TargetName in any combination of upper or
lower case. For example if you use “DeBuG” or "DEBUG" anywhere in your targetname, debugging will
not work correctly.
The only characters in the string are the hyphen (-), the underscore(_), the digits 0 through 9, and the
letters A through Z (upper or lower case).
The maximum length of the string is 24 characters.
7. In Device Manager locate the USB Controller that you intend to use for debugging. Under Location on the
General tab, the bus, device, and function numbers are displayed. Enter this command:
bcdedit /set "{dbgsettings}" busparams b.d.f
where b, d, and f are the bus, device, and function numbers for the USB host controller. The bus, device,
and function numbers must be in decimal format.
Example:
bcdedit /set "{dbgsettings}" busparams 48.0.0
8. Reboot the target computer.
Disable Power Management
In some cases, power transitions can interfere with debugging over USB 3.0. To avoid these problems, disable
selective suspend for the xHCI host controller (and its root hub) that you are using for debugging.
1. In Device Manager, navigate to the node for the xHCI host controller. Right click the node, and choose
Proper ties . If there is a Power Management tab, open the tab, and clear the Allow the computer to
turn off this device to save power check box.
2. In Device Manager, navigate to the node for the root hub of the xHCI host controller. Right click the node,
and choose Proper ties . If there is a Power Management tab, open the tab, and clear the Allow the
computer to turn off this device to save power check box.
When you have finished using the xHCI host controller for debugging, re-enable selective suspend for the xHCI
host controller.
Troubleshooting
USB device not recognized
If a windows notification appears on the host with the text "USB device not recognized" when inserting the
debug cable it is possible that a known USB 3.1 to 3.1 compatibility issue is being hit. This issue affects debug
configurations when the debug cable is connected to a USB 3.1 controller on the host and an Intel (Ice Lake or
Tiger Lake) 3.1 USB controller on the target.
For more information and processor model listings see Ice Lake (microprocessor) - Wikipedia and or Tiger Lake
(microprocessor) - Wikipedia. To find the processor model of the target machine, open the Settings app and go
to "System" then "About". "Processor" will be listed under "Device specifications".
To verify this is the problem occurring, open device manager and look for "USB Debug Connection Device"
under "Universal Serial Bus controllers". If this device cannot be found, check for an "Unknown device" under
"Other devices". Right click on the device to open its properties page. The device status text box will have the text
"Windows has stopped this device because it has reported problems. (Code 43)" and "The USB device returned
an invalid USB BOS descriptor".
To work around this problem, run these commands from an administrator command prompt to make changes
to the registry:
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\349500E00000 /v SkipBOSDescriptorQuery
/t REG_DWORD /d 1 /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\045E06560000 /v SkipBOSDescriptorQuery
/t REG_DWORD /d 1 /f
Related topics
Setting Up Kernel-Mode Debugging Manually
Setting Up Kernel-Mode Debugging over a USB 2.0
Cable Manually
6/16/2021 • 7 minutes to read • Edit Online
Debugging Tools for Windows supports kernel debugging over a USB 2.0 cable. This topic describes how to set
up USB 2.0 debugging manually.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer.
Debugging over a USB 2.0 cable requires the following hardware:
A USB 2.0 debug cable. This cable is not a standard USB 2.0 cable because it has an extra hardware
component that makes it compatible with the USB2 Debug Device Functional Specification. You can find
these cables with an Internet search for the term USB 2.0 debug cable.
On the host computer, an EHCI (USB 2.0) host controller
On the target computer, an EHCI (USB 2.0) host controller that supports debugging
Note Many EHCI host controllers support debugging on port 1, but some EHCI host controllers support
debugging on port 2.
4. Make a note of the bus, device, and function numbers for the EHCI controller that you intend to use for
debugging. UsbView displays these number. In the preceding example, the bus number is 0, the device
number is 29, and the function number is 7.
5. After you have identified the EHCI controller and the port number that supports debugging, the next step
is to locate the physical USB connector that is associated with the correct port number. To find the
physical connector, plug any USB 2.0 device into any USB connector on the target computer. Refresh
UsbView to see where your device is located. If UsbView shows your device connected to the EHCI host
controller and port that you identified as the debug port, then you have found a physical USB connector
that you can use for debugging. It could be that there is no external physical USB connector that is
associated with a debug port on an EHCI controller. In that case, you can look for a physical USB
connector inside the computer. Perform the same steps to determine whether the internal USB connector
is suitable for kernel debugging. If you cannot find a physical USB connector (either external or internal)
that is associated with a debug port, then you cannot use the computer as a target for debugging over a
USB 2.0 cable.
Note See this remark for an exception.
IMPORTANT
Before using bcdedit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. You can re-enable Secure Boot once you’re done debugging and you’ve
disabled kernel debugging.
6. On the target computer, open a Command Prompt window as Administrator, and enter these commands:
bcdedit /debug on
bcdedit /dbgsettings usb targetname:TargetName
where TargetName is a name that you create for the target computer. Note that TargetName does not
have to be the official name of the target computer; it can be any string that you create as long as it
meets these restrictions:
The string must not contain “debug” anywhere in the TargetName in any combination of upper or
lower case. For example if you use “DeBuG” or "DEBUG" anywhere in your targetname, debugging will
not work correctly.
The only characters in the string are the hyphen (-), the underscore(_), the digits 0 through 9, and the
letters A through Z (upper or lower case).
The maximum length of the string is 24 characters.
7. In Device Manager locate the USB Controller that you intend to use for debugging. Under Location on the
General tab, the bus, device, and function numbers are displayed. Enter this command:
bcdedit /set "{dbgsettings}" busparams b.d.f
where b, d, and f are the bus, device, and function numbers for the host controller. The bus, device, and function
numbers must be in decimal format (for example, busparams 0.29.7 ).
8. Reboot the target computer.
What if USBView shows a debug-capable port, but does not show the
port mapped to any physical connector?
On some computers, USBView shows a debug-capable port, but does not show the port mapped to any physical
USB connector. For example, USBView might show port 2 as the debug port number for an eHCI controller.
Also, when you use USBView to look at the individual port, it is listed as debug-capable.
[Port 2]
Is Port User Connectiable: Yes
Is Port Debug Capable: Yes
...
Protocols Supported
USB 1.1 yes
USB 2.0 yes
USB 3.0 no
But when you plug in a USB 2.0 device (like a flash drive) to all the USB connectors on the computer, USBView
never show your device connected to the debug-capable port (port 2 in this example). USBView might show the
external connector mapped to a port of an xHCI controller when in fact the external connector is mapped to the
debug-capable port of the eHCI controller.
In a case like this, you might still be able to establish kernel-mode debugging over a USB 2.0 cable. In the
example given here, you would plug your USB 2.0 debug cable into the connector that shows as being mapped
to Port 2 of the xHCI controller. Then you would set your bus parameters to the bus, device, and function
numbers of the eHCI controller (in this example, 0.29.0).
bcdedit /set "{dbgsettings}" busparams 0.29.0
Additional Support
For troubleshooting tips and other information see the Microsoft USB Blog.
Related topics
Setting Up Kernel-Mode Debugging Manually
Setting Up Kernel-Mode Debugging over a 1394
Cable Manually
3/5/2021 • 4 minutes to read • Edit Online
IMPORTANT
The 1394 transport is available for use in Windows 10, version 1607 and earlier. It is not available in later versions of
Windows. You should transition your projects to other transports, such as KDNET using Ethernet. For more information
about that transport, see Setting Up KDNET Network Kernel Debugging Automatically.
Debugging Tools for Windows supports kernel debugging over a 1394 (Firewire) cable. This topic describes how
to set up 1394 debugging manually.
The computer that runs the debugger is called the host computer, and the computer being debugged is called
the target computer. The host and target computers must each have a 1394 adapter and must be running
Windows XP or later. The host and target computers do not have to be running the same version of Windows.
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
2. In an elevated Command Prompt window, enter the following commands, where n is a channel number
of your choice, from 0 through 62:
bcdedit /debug on
bcdedit /dbgsettings 1394 channel:n
3. You must specify the bus, device, and function numbers of the 1394 controller that you intend to use for
debugging. For more information, see Troubleshooting Tips for 1394 Debugging.
4. Do not reboot the target computer yet.
Additional Information
For complete documentation of the bcdedit command and the boot.ini file, see Boot Options for Driver Testing
and Debugging in the Windows Driver Kit (WDK) documentation.
Related topics
Setting Up Kernel-Mode Debugging Manually
Setting Up KDNET Network Kernel Debugging Automatically
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10
6/15/2021 • 7 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
To do kernel debugging over a network cable, the target computer must have a supported network adapter.
When the target computer is running Windows, the network adapters listed here are supported for kernel
debugging.
Version Information
This topic lists the supported adapters for the following versions of Windows
Windows 10, version 20H2 Build 19042
Checking the VerifiedNicList.xml that ships in the WDK for a particular release, is required because additional
hardware support is added to new releases of Windows that is not present in previous releases. So you must
check the VerifiedNicLIst.xml file for that particular release.
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
<deviceid>8161</deviceid>
<deviceid>8161</deviceid>
<deviceid>8125</deviceid>
<deviceid>8225</deviceid>
<deviceid>2502</deviceid>
<deviceid>2600</deviceid>
<deviceid>3000</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
<deviceid>16C0</deviceid>
<deviceid>16C9</deviceid>
<deviceid>16CA</deviceid>
<deviceid>16CC</deviceid>
<deviceid>16CD</deviceid>
<deviceid>16CE</deviceid>
<deviceid>16CF</deviceid>
<deviceid>16D0</deviceid>
<deviceid>16D1</deviceid>
<deviceid>16D2</deviceid>
<deviceid>16D4</deviceid>
<deviceid>16D5</deviceid>
<deviceid>16D6</deviceid>
<deviceid>16D7</deviceid>
<deviceid>16D8</deviceid>
<deviceid>16D9</deviceid>
<deviceid>16DA</deviceid>
<deviceid>16DB</deviceid>
<deviceid>16DC</deviceid>
<deviceid>16DE</deviceid>
<deviceid>16DF</deviceid>
<deviceid>16E0</deviceid>
<deviceid>16E2</deviceid>
<deviceid>16E3</deviceid>
<deviceid>16E4</deviceid>
<deviceid>16E7</deviceid>
<deviceid>16E8</deviceid>
<deviceid>16E9</deviceid>
<deviceid>16EA</deviceid>
<deviceid>16EB</deviceid>
<deviceid>16EC</deviceid>
<deviceid>16ED</deviceid>
<deviceid>16EE</deviceid>
<deviceid>16EF</deviceid>
<deviceid>16F0</deviceid>
<deviceid>16F1</deviceid>
<deviceid>1614</deviceid>
<deviceid>D802</deviceid>
<deviceid>1604</deviceid>
<deviceid>1605</deviceid>
<deviceid>1606</deviceid>
<deviceid>1607</deviceid>
<deviceid>1608</deviceid>
<deviceid>1609</deviceid>
<deviceid>D804</deviceid>
<deviceid>D812</deviceid>
<deviceid>D814</deviceid>
<deviceid>D818</deviceid>
<deviceid>D82A</deviceid>
<deviceid>D82B</deviceid>
<deviceid>D82C</deviceid>
<deviceid>D82D</deviceid>
<deviceid>D82E</deviceid>
<deviceid>D82F</deviceid>
<deviceid>1902</deviceid>
<deviceid>1903</deviceid>
<deviceid>1906</deviceid>
<deviceid>1907</deviceid>
<deviceid>190A</deviceid>
<deviceid>190B</deviceid>
<deviceid>1799</deviceid>
<deviceid>1041</deviceid>
<deviceid>1042</deviceid>
<deviceid>1043</deviceid>
<deviceid>1750</deviceid>
<deviceid>1751</deviceid>
<deviceid>1752</deviceid>
<deviceid>1800</deviceid>
<deviceid>1801</deviceid>
<deviceid>1802</deviceid>
<deviceid>1803</deviceid>
<deviceid>1804</deviceid>
<deviceid>1805</deviceid>
<deviceid>1806</deviceid>
<deviceid>1807</deviceid>
<deviceid>1808</deviceid>
<deviceid>1809</deviceid>
<deviceid>16C1</deviceid>
<deviceid>16C5</deviceid>
<deviceid>16BD</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10 version 2004 (20H1) Build
19041
6/15/2021 • 3 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
To do kernel debugging over a network cable, the target computer must have a supported network adapter.
When the target computer is running Windows, the network adapters listed here are supported for kernel
debugging.
Version Information
This topic lists the supported adapters for the following versions of Windows
Windows 10, version 2004 (20H1) Build 19041
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
<deviceid>8161</deviceid>
<deviceid>8125</deviceid>
<deviceid>8225</deviceid>
<deviceid>2502</deviceid>
<deviceid>2600</deviceid>
<deviceid>3000</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
<deviceid>16C0</deviceid>
<deviceid>16C9</deviceid>
<deviceid>16CA</deviceid>
<deviceid>16CC</deviceid>
<deviceid>16CD</deviceid>
<deviceid>16CE</deviceid>
<deviceid>16CF</deviceid>
<deviceid>16D0</deviceid>
<deviceid>16D1</deviceid>
<deviceid>16D2</deviceid>
<deviceid>16D4</deviceid>
<deviceid>16D5</deviceid>
<deviceid>16D6</deviceid>
<deviceid>16D7</deviceid>
<deviceid>16D8</deviceid>
<deviceid>16D9</deviceid>
<deviceid>16DA</deviceid>
<deviceid>16DB</deviceid>
<deviceid>16DC</deviceid>
<deviceid>16DE</deviceid>
<deviceid>16DF</deviceid>
<deviceid>16E0</deviceid>
<deviceid>16E2</deviceid>
<deviceid>16E3</deviceid>
<deviceid>16E4</deviceid>
<deviceid>16E7</deviceid>
<deviceid>16E8</deviceid>
<deviceid>16E9</deviceid>
<deviceid>16EA</deviceid>
<deviceid>16EB</deviceid>
<deviceid>16EC</deviceid>
<deviceid>16ED</deviceid>
<deviceid>16EE</deviceid>
<deviceid>16EF</deviceid>
<deviceid>16F0</deviceid>
<deviceid>16F1</deviceid>
<deviceid>1614</deviceid>
<deviceid>D802</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10, version 1909 (19H2) Build
18363
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows
Windows 10, version 1909 (19H2) Build 18363
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
<deviceid>8161</deviceid>
<deviceid>8125</deviceid>
<deviceid>8225</deviceid>
<deviceid>2502</deviceid>
<deviceid>2600</deviceid>
<deviceid>3000</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10 version 1903 (19H1) Build
18362
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows
Windows 10, version 1903 (19H1) Build 18362
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
<deviceid>8161</deviceid>
<deviceid>8125</deviceid>
<deviceid>8225</deviceid>
<deviceid>2502</deviceid>
<deviceid>2600</deviceid>
<deviceid>3000</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10, version 1809 (Redstone
5) Build 17763
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows
Windows 10, version 1809 (Redstone 5) Build 17763
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10, version 1803 (Redstone
4) Build 17134
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows.
Windows 10, version 1803 (Redstone 4) Build 17134
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10 version 1709 (Redstone
3) Build 16299
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows
Windows 10, version 1709 (Redstone 3) Build 16299
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 10 version 1703 (Redstone
2) Build 15063
3/5/2021 • 2 minutes to read • Edit Online
To do kernel debugging over an Ethernet network cable, the target computer must have a supported network
interface card (NIC).
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
For general information on supported network adapters see Supported Ethernet NICs for Network Kernel
Debugging in Windows 10.
Version Information
The list of supported adapters is for the following versions of Windows.
Windows 10, version 1703 Redstone 2 Build 15063
<NIC>
<manufacturer>10EC</manufacturer>
<deviceid>8136</deviceid>
<deviceid>8137</deviceid>
<deviceid>8168</deviceid>
<deviceid>8167</deviceid>
<deviceid>8169</deviceid>
<deviceid>8166</deviceid>
</NIC>
<NIC>
<manufacturer>14E4</manufacturer>
<deviceid>1644</deviceid>
<deviceid>1645</deviceid>
<deviceid>1646</deviceid>
<deviceid>16A6</deviceid>
<deviceid>16C6</deviceid>
<deviceid>1647</deviceid>
<deviceid>16A7</deviceid>
<deviceid>16C7</deviceid>
<deviceid>164D</deviceid>
<deviceid>1648</deviceid>
<deviceid>16A8</deviceid>
<deviceid>1653</deviceid>
<deviceid>166E</deviceid>
<deviceid>1654</deviceid>
<deviceid>165D</deviceid>
<deviceid>165E</deviceid>
<deviceid>166D</deviceid>
<deviceid>170D</deviceid>
<deviceid>170E</deviceid>
<deviceid>1696</deviceid>
<deviceid>1676</deviceid>
<deviceid>1677</deviceid>
<deviceid>1659</deviceid>
<deviceid>167C</deviceid>
<deviceid>167D</deviceid>
<deviceid>169D</deviceid>
<deviceid>16F7</deviceid>
<deviceid>16FD</deviceid>
<deviceid>16FE</deviceid>
<deviceid>16DD</deviceid>
<deviceid>1668</deviceid>
<deviceid>1669</deviceid>
<deviceid>1678</deviceid>
<deviceid>1679</deviceid>
<deviceid>1600</deviceid>
<deviceid>1601</deviceid>
<deviceid>166A</deviceid>
<deviceid>166B</deviceid>
<deviceid>16FF</deviceid>
<deviceid>170F</deviceid>
<deviceid>169B</deviceid>
<deviceid>169B</deviceid>
<deviceid>1693</deviceid>
<deviceid>167F</deviceid>
<deviceid>169A</deviceid>
<deviceid>1698</deviceid>
<deviceid>1692</deviceid>
<deviceid>1694</deviceid>
<deviceid>1690</deviceid>
<deviceid>1691</deviceid>
<deviceid>1699</deviceid>
<deviceid>16A0</deviceid>
<deviceid>167B</deviceid>
<deviceid>1673</deviceid>
<deviceid>165A</deviceid>
<deviceid>1674</deviceid>
<deviceid>1681</deviceid>
<deviceid>1680</deviceid>
<deviceid>1688</deviceid>
<deviceid>167A</deviceid>
<deviceid>1672</deviceid>
<deviceid>1684</deviceid>
<deviceid>165B</deviceid>
<deviceid>16B1</deviceid>
<deviceid>16B5</deviceid>
<deviceid>16B0</deviceid>
<deviceid>16B4</deviceid>
<deviceid>16B2</deviceid>
<deviceid>16B6</deviceid>
<deviceid>1682</deviceid>
<deviceid>1686</deviceid>
<deviceid>16B3</deviceid>
<deviceid>16B7</deviceid>
<deviceid>1655</deviceid>
<deviceid>1665</deviceid>
<deviceid>1656</deviceid>
<deviceid>1657</deviceid>
<deviceid>165F</deviceid>
<deviceid>165C</deviceid>
<deviceid>1683</deviceid>
<deviceid>1641</deviceid>
<deviceid>1642</deviceid>
<deviceid>1643</deviceid>
<deviceid>1687</deviceid>
<deviceid>164A</deviceid>
<deviceid>16AA</deviceid>
<deviceid>164C</deviceid>
<deviceid>16AC</deviceid>
<deviceid>1639</deviceid>
<deviceid>163A</deviceid>
<deviceid>163B</deviceid>
<deviceid>163C</deviceid>
<deviceid>164E</deviceid>
<deviceid>164F</deviceid>
<deviceid>1650</deviceid>
<deviceid>1662</deviceid>
<deviceid>1663</deviceid>
<deviceid>168A</deviceid>
<deviceid>168D</deviceid>
<deviceid>16A1</deviceid>
<deviceid>16A2</deviceid>
<deviceid>168E</deviceid>
<deviceid>163D</deviceid>
<deviceid>16A5</deviceid>
<deviceid>16A4</deviceid>
<deviceid>16AE</deviceid>
<deviceid>163E</deviceid>
</NIC>
<NIC>
<manufacturer>1969</manufacturer>
<manufacturer>1969</manufacturer>
<deviceid>1062</deviceid>
<deviceid>1063</deviceid>
<deviceid>2060</deviceid>
<deviceid>2062</deviceid>
<deviceid>1073</deviceid>
<deviceid>1083</deviceid>
<deviceid>1090</deviceid>
<deviceid>1091</deviceid>
<deviceid>E091</deviceid>
<deviceid>10A0</deviceid>
<deviceid>10A1</deviceid>
<deviceid>E0A1</deviceid>
<deviceid>10B0</deviceid>
<deviceid>10B1</deviceid>
<deviceid>E0B1</deviceid>
<deviceid>10C0</deviceid>
<deviceid>10C1</deviceid>
<deviceid>E0C1</deviceid>
<deviceid>10D0</deviceid>
<deviceid>10D1</deviceid>
<deviceid>E0D1</deviceid>
<deviceid>10E0</deviceid>
<deviceid>10E1</deviceid>
<deviceid>E0E1</deviceid>
<deviceid>10F0</deviceid>
<deviceid>10F1</deviceid>
<deviceid>E0F1</deviceid>
</NIC>
<NIC>
<manufacturer>19A2</manufacturer>
<deviceid>0211</deviceid>
<deviceid>0215</deviceid>
<deviceid>0221</deviceid>
<deviceid>0700</deviceid>
<deviceid>0710</deviceid>
</NIC>
<NIC>
<manufacturer>10DF</manufacturer>
<deviceid>0720</deviceid>
<deviceid>E220</deviceid>
</NIC>
<NIC>
<manufacturer>15B3</manufacturer>
<deviceid>1000</deviceid>
<deviceid>1001</deviceid>
<deviceid>1002</deviceid>
<deviceid>1003</deviceid>
<deviceid>1004</deviceid>
<deviceid>1005</deviceid>
<deviceid>1006</deviceid>
<deviceid>1007</deviceid>
<deviceid>1008</deviceid>
<deviceid>1009</deviceid>
<deviceid>100A</deviceid>
<deviceid>100B</deviceid>
<deviceid>100C</deviceid>
<deviceid>100D</deviceid>
<deviceid>100E</deviceid>
<deviceid>100F</deviceid>
<deviceid>1010</deviceid>
<deviceid>6340</deviceid>
<deviceid>6341</deviceid>
<deviceid>634A</deviceid>
<deviceid>634B</deviceid>
<deviceid>6354</deviceid>
<deviceid>6368</deviceid>
<deviceid>6369</deviceid>
<deviceid>6372</deviceid>
<deviceid>6732</deviceid>
<deviceid>6733</deviceid>
<deviceid>673C</deviceid>
<deviceid>673D</deviceid>
<deviceid>6746</deviceid>
<deviceid>6750</deviceid>
<deviceid>6751</deviceid>
<deviceid>675A</deviceid>
<deviceid>6764</deviceid>
<deviceid>6765</deviceid>
<deviceid>676E</deviceid>
<deviceid>6778</deviceid>
<deviceid>1013</deviceid>
<deviceid>1015</deviceid>
<deviceid>1017</deviceid>
<deviceid>1019</deviceid>
<deviceid>101B</deviceid>
<deviceid>101D</deviceid>
<deviceid>101F</deviceid>
<deviceid>1021</deviceid>
<deviceid>1023</deviceid>
<deviceid>1025</deviceid>
<deviceid>1027</deviceid>
<deviceid>1029</deviceid>
<deviceid>102B</deviceid>
<deviceid>102F</deviceid>
</NIC>
<NIC>
<manufacturer>1137</manufacturer>
<deviceid>0043</deviceid>
</NIC>
</SupportedNetworkInterfaceCards>
Related topics
Setting Up Kernel-Mode Debugging over a Network Cable in Visual Studio
Setting Up KDNET Network Kernel Debugging Automatically
Setting Up KDNET Network Kernel Debugging Manually
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel
Debugging in Windows 8.1
3/5/2021 • 3 minutes to read • Edit Online
You can do kernel debugging over an Ethernet network cable when the target computer is running Windows 8.1.
The target computer must have a supported network interface card (NIC) or network adapter.
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
To do kernel debugging over a network cable, the target computer must have a supported network adapter.
When the target computer is running Windows 8.1, the network adapters listed here are supported for kernel
debugging.
Note Support for kernel debugging over selected 10 gigabit network adapters is a new feature in Windows 8.1.
Debugging over 10 gigabit network adapters is not supported in Windows 8. For a list of network adapters
supported by Windows 8 for kernel debugging, see Supported Ethernet NICs for Network Kernel Debugging in
Windows 8.
System Requirements
Kernel debugging through Ethernet NICs requires certain low-level platform support. Windows requires that
these NICs be attached via PCI/PCIe for this debugging solution. In most cases, simply plugging in one of these
supported NICs will allow a robust kernel debugging experience. However, there may be cases where BIOS
configuration details hinder the Windows debug path. The following platform requirement should be
considered:
System firmware should discover and configure the NIC device such that its resources do not conflict with
any other devices that have been BIOS-configured.
Related topics
Setting Up KDNET Network Kernel Debugging Automatically
Supported Ethernet NICs for Network Kernel Debugging in Windows 8
Supported Ethernet NICs for Network Kernel
Debugging in Windows 8
3/5/2021 • 3 minutes to read • Edit Online
You can do kernel debugging over an Ethernet network cable when the target computer is running Windows 8.
The target computer must have a supported network interface card (NIC) or network adapter.
During kernel debugging, the computer that runs the debugger is called the host computer, and the computer
being debugged is called the target computer. For more information, see Setting Up KDNET Network Kernel
Debugging Automatically.
To do kernel debugging over a network cable, the target computer must have a supported network adapter.
When the target computer is running Windows 8, the network adapters listed here are supported for kernel
debugging.
Note For a list of network adapters supported by Windows 8.1 for kernel debugging, see Supported Ethernet
NICs for Network Kernel Debugging in Windows 8.1.
System Requirements
Kernel debugging through Ethernet NICs requires certain low-level platform support. Windows requires that
these NICs be attached via PCI/PCIe for this debugging solution. In most cases, simply plugging in one of these
supported NICs will allow a robust kernel debugging experience. However, there may be cases where BIOS
configuration details hinder the Windows debug path. The following set of platform requirements should be
considered:
System firmware should discover and configure the NIC device such that its resources do not conflict with
any other devices that have been BIOS-configured.
System firmware should place the NIC’s resources under address windows that are not marked prefetchable.
Related topics
Setting Up KDNET Network Kernel Debugging Automatically
Supported Ethernet NICs for Network Kernel Debugging in Windows 8.1
Supported Ethernet NICs for Network Kernel Debugging in Windows 10
Configuring tools.ini
3/5/2021 • 3 minutes to read • Edit Online
The file tools.ini contains information to initialize the command-line debuggers. On startup, the debugger
searches for the appropriate section header in the tools.ini file and extracts initialization information from the
entries under the header. Each command-line debugger has its own section header - [CDB], [NTSD], and [KD].
The environment variable INIT must point to the directory containing the tools.ini file.
WinDbg does not use the tools.ini file. Instead, WinDbg saves initialization settings in workspaces.
The tools.ini entries are shown in the following table.
Keywords must be separated from the values by white space or a colon. Keywords are not case-sensitive.
For TRUE or FALSE values, "FALSE" is the only false value. Anything else is TRUE .
EN T RY DESC RIP T IO N
$u0: value ... $u9: value Assign values to fixed-name aliases. You can specify
numeric values n or 0xn or any other string. See Using
Aliases for details. No command-line equivalent.
IniFile: file Specifies the name of the script file that CDB or KD takes
commands from at startup. The default is the ntsd.ini file
in the current directory. Command-line equivalent is -cf .
For details, see Using Script Files.
SetDll: filename Set extension DLL. The .dll filename extension should be
omitted. Default is userexts.dll. Command-line
equivalent is -a .
For details, and other methods of setting this default,
see Loading Debugger Extension DLLs.
EN T RY DESC RIP T IO N
sxd: event sxe: event Sets the debugger response and the handling status for
the specified exception or event.
Exceptions and events may be specified in the following
ways:
* : Default exception n: Exception n (decimal) 0xn:
Exception 0xn (hexadecimal) (other): Event code
See Controlling Exceptions and Events for details of this
process and for other methods of controlling these
settings.
srcopt: options Sets the source line options that control source display
and program stepping options. For more information
see l+, l- (Set Source Options) .
srcpath: directory Sets the source file search path. For more information
see .srcpath, .lsrcpath (Set Source Path) .
col_mode: flag TRUE or FALSE . The col_mode flag controls the color
mode setting. When color mode is enabled the
debugger can produce colored output. By default, most
colors are not set and instead default to the current
console colors.
EN T RY DESC RIP T IO N
col: name colspec The name indicates the element that you are coloring.
The colspec is a three-letter RGB indicator of the form
[rR-][gG-][bB-]. A lower-case letter indicates darker, an
upper-case letter indicates brighter and a dash indicates
no color component contribution. Due to console color
limitations, bright is not actually per-component, but
applies to all components if any request bright. In other
words, rgB is the same as RGB. For this reason, it is
recommended that all caps be used if any caps are going
to be used.
Example usage:
col: emphfg R--
[NTSD]
sxe: 3c
sxe: cc
$u0: VeryLongName
VerboseOutput:true
Using KDbgCtrl
3/5/2021 • 5 minutes to read • Edit Online
The KDbgCtrl (Kernel Debugging Control, kdbgctrl.exe) tool can be used to control the kernel debugging
connection from the target computer.
To use this tool, your target computer must be running Windows Server 2003 or a later version of Windows.
KDbgCtrl can control five different settings: Full Kernel Debugging, Automatic Kernel Debugging, User-Mode
Error Handling, Blocking of Kernel Debugging, and the size of the DbgPrint buffer.
To use KDbgCtrl, you must have already enabled kernel debugging in the boot settings of the target computer
before the last boot. KDbgCtrl cannot be used to enable kernel debugging if this was not done. See Boot
Parameters to Enable Debugging for details on these boot settings.
Full Kernel Debugging
When Full Kernel Debugging is enabled, a kernel debugger running on the host computer can break into the
target computer. The target computer will break into the kernel debugger if a kernel-mode exception is hit.
Messages from the target to the host, such as DbgPrint output, symbol load messages, and redirected user-
mode debuggers, are also allowed.
If this setting is disabled, all signals from the host computer will be ignored by the target.
Full Kernel Debugging is enabled by default. To check the current setting value, use kdbgctrl -c . To disable this
setting, use kdbgctrl -d . To enable this setting, use kdbgctrl -e .
If you wish to check the current setting and use it to control execution within a batch file, you can use the
kdbgctrl -cx command. For details on this command, see KDbgCtrl Command-Line Options .
Automatic Kernel Debugging
If Full Kernel Debugging is enabled, the current setting for Automatic Kernel Debugging is immaterial -- all
communication is permitted.
When Full Kernel Debugging is disabled and Automatic Kernel Debugging is enabled, only the target computer
can initiate a debugging connection.
In this case, only a kernel-mode exception, breakpoint, or other kernel-mode event will cause a connection to be
established. The connection will not be established for DbgPrint output, symbol load messages, redirected
user-mode debugger input and output, or other similar messages -- these will be stored in the DbgPrint buffer
instead of being sent to the kernel debugger.
If an exception or event causes the target to break into the kernel debugger, then Full Kernel Debugging will be
automatically turned on, just as if you had executed kdbgctrl -e .
Automatic Kernel Debugging is disabled by default (although this is immaterial unless Full Kernel Debugging is
disabled as well). To check the current setting value, use kdbgctrl -ca . To disable this setting, use kdbgctrl -da .
To enable this setting, use kdbgctrl -ea .
User-Mode Error Handling
When User-Mode Error Handling is enabled, some user-mode events will cause the target computer to break
into the kernel debugger.
Specifically, all int 3 interrupts -- such as breakpoints inserted into the code by a debugger or calls to
DbgBreakPoint -- will cause a break into the kernel debugger. However, standard exceptions -- such as access
violations and division by zero -- will usually not be sent to the kernel debugger.
If a user-mode debugger is already attached to the process, this debugger will capture all user-mode errors, and
the kernel debugger will not be alterted. For the precedence ranking of the various user-mode error handlers,
see Enabling Postmortem Debugging.
For User-Mode Error Handling to function, either Full Kernel Debugging or Automatic Kernel Debugging must
be enabled as well.
User-Mode Error Handling is enabled by default. To check the current setting value, use kdbgctrl -cu . To disable
this setting, use kdbgctrl -du . To enable this setting, use kdbgctrl -eu .
Blocking Kernel Debugging
In some cases you might want to set up the target computer for kernel debugging, but wait to enable kernel
debugging until after the target computer is started. You can do that by blocking kernel debugging.
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
To block kernel debugging, set up the target computer by using commands similar to the following:
bcdedit /debug on
bcdedit /dbgsettings 1394 channel:32 /start DISABLE /noumex
When you restart the target computer, it will be prepared for kernel debugging, but kernel debugging and User-
Mode Error Handling will be disabled. At that point, a host computer will not be able to attach to the target
computer, bug checks will not be caught by the kernel debugger, and user-mode exceptions will not cause a
break in to the kernel debugger.
When you are ready, you can enable kernel debugging (without restarting the target computer) by entering the
following commands.
kdbgctrl -db
kdbgctrl -e
Later, you can disable kernel debugging by entering the following commands.
kdbgctrl -d
kdbgctrl -eb
You can use kdbgctrl -cb to check whether kernel debugging is blocked.
The DbgPrint Buffer Size
The DbgPrint buffer stores messages that the target computer has sent to the kernel debugger.
If Full Kernel Debugging is enabled, these messages will automatically appear in the kernel debugger. But if this
option is disabled, these messages will be stored in the buffer. At a later point in time, you can enable kernel
debugging, connect to a kernel debugger, and use the !dbgprint extension to see the contents of this buffer. For
more information about this buffer, see The DbgPrint Buffer.
The default size of the DbgPrint buffer is 4 KB on a free build of Windows. To determine the current buffer size,
use kdbgctrl -cdb . To change the buffer size, use kdbgctrl -sdb Size, where Size specifies the new buffer size.
For syntax details, see KDbgCtrl Command-Line Options .
Examples
To display all the current settings, use the following command:
To lock out the host computer so that it only is contacted on exceptions, use the following command:
kdbgctrl -d -da
If you are disabling all kernel debugging, you may also wish to increase the size of the DbgPrint buffer. This
insures that all messages will be saved in case you need to see them later. If you have a megabyte of memory to
spare, you might use the following command:
This lab introduces the WinDbg kernel debugger. WinDbg is used to debug the echo kernel mode sample driver
code.
Lab objectives
This lab includes exercises that introduce the debugging tools, teach common debugging commands, illustrate
the use of break points, and show the use of the debugging extensions.
In this lab, a live kernel debug connection is used to explore the following:
Use the Windows debugger commands
Use standard commands (Call stacks, variables, threads, IRQL)
Use advanced driver debugging commands (!commands)
Use symbols
Set breakpoints in live debugging
View call stacks
Display the Plug and Play device tree
Work with thread and process context
Note When working with the Windows debugger, there are two types of debugging that can be performed -
user or kernel mode debugging.
User mode - Applications and subsystems run on the computer in user mode. Processes that run in user mode
do so within their own virtual address spaces. They are restricted from gaining direct access to many parts of
the system, including system hardware, memory that was not allocated for their use, and other portions of the
system that might compromise system integrity. Because processes that run in user mode are effectively
isolated from the system and other user mode processes, they cannot interfere with these resources.
Kernel mode - Kernel mode is the processor access mode in which the operating system and privileged
programs run. Kernel mode code has permission to access any part of the system, and is not restricted like user
mode code. It can gain access to any part of any other process running in either user mode or kernel mode.
Much of the core OS functionality and many hardware device drivers run in kernel mode.
This lab will focus on kernel mode debugging, as that is the method used to debug many device drivers.
This exercise covers debug commands that are frequently used during both user-mode and kernel-mode
debugging. The exercise also covers debug extensions (sometimes called "!commands") that are used for kernel-
mode debugging.
Lab setup
You will need the following hardware to be able to complete the lab.
A laptop or desktop computer (host) running Windows 10
A laptop or desktop computer (target) running Windows 10
A network hub/router and network cables to connect the two PCs
Access to the internet to download symbol files
You will need the following software to be able to complete the lab.
Visual Studio
Windows Software Development Kit (SDK) for Windows 10
Windows Driver Kit (WDK) for Windows 10
The sample echo driver for Windows 10
The lab has the following eleven sections.
Section 1: Connect to a kernel mode WinDbg session
Section 2: Kernel mode debugging commands and techniques
Section 3: Download and build the KMDF Echo Driver
Section 4: Install the KMDF Echo driver sample on the target system
Section 5: Use WinDbg to display information about the driver
Section 6: Display Plug and Play device tree information
Section 7: Work with breakpoints and source code
Section 8: View variables and call stacks
Section 9: Display processes and threads
Section 10: IRQL, Registers and Ending the WinDbg session
Section 11: Windows debugging resources
To work with kernel mode applications and use WinDbg, we recommend that you use the KDNET over Ethernet
transport. For information about how to use the Ethernet transport protocol, see Getting Started with WinDbg
(Kernel-Mode). For more information about setting up the target computer, see Preparing a Computer for
Manual Driver Deployment and Setting Up KDNET Network Kernel Debugging Automatically.
Configure kernel–mode debugging using ethernet
To enable kernel mode debugging on the target system, perform the following steps.
<- On the host system
1. Open a command prompt on the host system and type ipconfig to determine its IP address.
C:\>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::c8b6:db13:d1e8:b13b%3
Autoconfiguration IPv4 Address. . : 169.182.1.1
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Enable kernel mode debugging on the target system by completing the following steps.
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
1. On the target computer, open a Command Prompt window as Administrator. Enter this command to
enable debugging.
3. Type this command to set the IP address of the host system. Use the IP address of the host system that
you recorded earlier, not the one shown.
Warning To increase the security of the connection and decrease the risk of the random client debugger
connection requests, consider using an auto generated random key. For more information, see Setting Up
KDNET Network Kernel Debugging Automatically.
4. Type this command to confirm that the dbgsettings they are set properly.
Note
Firewalls and debuggers
If you receive a pop-up message from the firewall, and you wish to use the debugger, check all three of the
boxes.
NOTE
This labs assumes that both PCs are running a 64 bit version of Windows on both the target and host. If that is not the
case, the best approach is to run the same "bitness" of tools on the host that the target is running. For example if the
target is running 32 bit Windows, run a 32 version of the debugger on the host. For more information, see Choosing the
32-Bit or 64-Bit Debugging Tools.
2. Launch WinDbg with remote user debug using the following command. The value for the key and port
match what we set earlier using BCDEdit on the target.
WinDbg –k net:port=50000,key=2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
The Debugger Command window is the primary debugging information window in WinDbg. You can enter
debugger commands and view the command output in this window.
The Debugger Command window is split into two panes. You type commands in the smaller pane (the
command entry pane) at the bottom of the window and view the command output in the larger pane at the top
of the window.
In the command entry pane, use the up arrow and down arrow keys to scroll through the command history.
When a command appears, you can edit it or press ENTER to run the command.
0: kd> .prefer_dml 1
DML versions of commands on by default
The Debugger help file will display help for the .prefer_dml command.
Display the version of Windows on the target system
5. Display detailed version information on the target system by typing the ver target (Show Target
Computer Version) command in the WinDbg window.
0: kd> vertarget
Windows 10 Kernel Version 9926 MP (4 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 9926.0.amd64fre.fbl_awesome1501.150119-1648
Machine Name: ""
Kernel base = 0xfffff801`8d283000 PsLoadedModuleList = 0xfffff801`8d58aef0
Debug session time: Fri Feb 20 10:15:17.807 2015 (UTC - 8:00)
System Uptime: 0 days 01:31:58.931
Note Output that has been omitted is indicated with "… " in this lab.
7. To request detailed information about a specific module, use the v (verbose) option as shown.
0: Kd> lm v m tcpip
Browse full module list
start end module name
fffff801`09eeb000 fffff801`0a157000 tcpip (no symbols)
Loaded symbol image file: tcpip.sys
Image path: \SystemRoot\System32\drivers\tcpip.sys
Image name: tcpip.sys
Browse all global symbols functions data
Timestamp: Sun Nov 09 18:59:03 2014 (546029F7)
CheckSum: 00263DB1
ImageSize: 0026C000
Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4
8. Because we have yet to set the symbol path and loaded symbols, limited information is available in the
debugger.
a. This lab, shows how to download the driver samples in one zip file.
https://github.com/Microsoft/Windows-driver-samples/archive/master.zip
b. Download the master.zip file to your local hard drive.
c. Select and hold (or right-click) Windows-driver-samples-master.zip, and choose Extract All . Specify a
new folder, or browse to an existing one that will store the extracted files. For example, you could specify
C:\DriverSamples\ as the new folder into which the files are extracted.
d. After the files are extracted, navigate to the following subfolder.
C:\DriverSamples\general\echo\kmdf
2. Open the driver solution in Visual Studio
In Microsoft Visual Studio, select File > Open > Project/Solution... and navigate to the folder that
contains the extracted files (for example, C:\DriverSamples\general\echo\kmdf). Double-click the
kmdfecho solution file to open it.
In Visual Studio, locate the Solution Explorer. (If this is not already open, choose Solution Explorer from
the View menu.) In Solution Explorer, you can see one solution that has three projects.
3. Set the sample's configuration and platform
In Solution Explorer, select and hold (or right-click) Solution 'kmdfecho' (3 projects) , and choose
Configuration Manager . Make sure that the configuration and platform settings are the same for the
three projects. By default, the configuration is set to "Win10 Debug", and the platform is set to "Win64"
for all the projects. If you make any configuration and/or platform changes for one project, you must
make the same changes for the remaining three projects.
4. Set the runtime librar y
Set the runtime library - Open the echo driver’s property page and locate C/C++ > Code Generation .
Change Runtime Library from DLL version to non DLL version. Without this setting, you have to install
the MSVC runtime to the target computer separately.
5. Check driver signing
Also on the driver’s properties make sure Driver Signing > Sign Mode is set to “Test Sign”. This is
required because Windows requires that drivers are signed.
F IL E DESC RIP T IO N
In addition, the echoapp.exe file was built and it should be located here:
C:\DriverSamples\general\echo\kmdf\exe\x64\Debug
F IL E DESC RIP T IO N
8. Locate a USB thumb drive or set up a network share to copy the built driver files and the test EchoApp
from the host to the target system.
In the next section, you will copy the code to the target system, and install and test the driver.
Section 4: Install the KMDF echo driver sample on the target system
In Section 4, you will use devcon to install the echo sample driver.
The computer where you install the driver is called the target computer or the test computer. Typically, this is a
separate computer from the computer on which you develop and build the driver package. The computer where
you develop and build the driver is called the host computer.
The process of moving the driver package to the target computer and installing the driver is called deploying the
driver.
Before you deploy a test signed driver, you must prepare the target computer by enabling test signing. You also
need to locate the DevCon tool in your WDK installation and copy that to the target system.
To install the driver on the target system, perform the following steps.
-> On the target system
Enable test signed drivers
Enable the ability to run test signed drivers:
a. Open Windows Settings.
b. In Update and Security, select Recover y .
c. Under Advanced startup, select Restar t Now .
d. When the PC reboots, select Star tup options . In Windows 10, select Troubleshoot > Advanced options >
Star tup Settings , then select Restart button.
e. Select Disable driver signature enforcement by pressing the F7 key.
f. Reboot the target computer.
<- On the host system
Navigate to the Tools folder in your WDK installation and locate the DevCon tool. For example, look in the
following folder:
C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe
Create a folder on the target for the built driver package (for example, C:\EchoDriver). Copy devcon.exe to the
target system. Locate the .cer certificate on the host system, it is in the same folder on the host computer in the
folder that contains the built driver files. Copy all the files from the built driver described earlier on the host
computer and save them to the same folder that you created on the target computer.
-> On the target system
On the target computer, select and hold (or right-click) the certificate file, and select Install , then follow the
prompts to install the test certificate.
If you need more detailed instructions for setting up the target computer, see Preparing a Computer for Manual
Driver Deployment.
-> On the target system
Install the driver
The following instructions show you how to install and test the sample driver. Here's the general syntax for the
devcon tool that you will use to install the driver:
devcon install <INF file> <hardware ID>
The INF file required for installing this driver is echo.inf. The inf file contains the hardware ID for installing the
echo.sys. For the echo sample the hardware ID is root\ECHO .
On the target computer, open a Command Prompt window as Administrator. Navigate to your driver package
folder, and enter the following command:
devcon install echo.inf root\ECHO If you get an error message about devcon not being recognized, try
adding the path to the devcon tool. For example, if you copied it to a folder called C:\Tools, then try using the
following command:
c:\tools\devcon install echo.inf root\ECHO A dialog box will appear indicating that the test driver is an
unsigned driver. Select Install this driver anyway to proceed.
TIP
If you have any issues with the installation, check the following file for more information.
%windir%\inf\setupapi.dev.log
After successfully installing the sample driver, you're now ready to test it.
Examine the driver in Device Manager
On the target computer, in a Command Prompt window, enter devmgmt open Device Manager. In Device
Manager, on the View menu, choose Devices by type. In the device tree, locate Sample WDF Echo Driver in the
Sample Device node.
C:\Samples\KMDF_Echo_Sample> echoapp
DevicePath: \\?\root#sample#0005#{cdc35b6e-0be4-4936-bf5f-5537380a7c1a}
Opened device successfully
512 Pattern Bytes Written successfully
512 Pattern Bytes Read successfully
Pattern Verified successfully
30720 Pattern Bytes Written successfully
30720 Pattern Bytes Read successfully
Pattern Verified successfully
WinDbg -k net:port=50000,key=2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p
2. Use Ctrl+Break (Scroll Lock) to break into the code running on the target system.
Setting the symbol path
1. To set the symbols path to the Microsoft symbol server in the WinDbg environment, use the .symfix
command.
0: kd> .symfix
2. To add your local symbol location to use your local symbols, add the path using .sympath+ and then
.reload /f .
Note The .reload command with the /f force option deletes all symbol information for the specified
module and reloads the symbols. In some cases, this command also reloads or unloads the module itself.
Note You must load the proper symbols to use advanced functionality that WinDbg provides. If you do not have
symbols properly configured, you will receive messages indicating that symbols are not available when you
attempt to use functionality that is dependent on symbols.
0:000> dv
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type “.hh dbgerr005” for details.
Note
Symbol ser vers
There are a number of approaches that can be used to work with symbols. In many situations, you can configure
the PC to access symbols from a symbol server that Microsoft provides when they are needed. This walkthrough
assumes that this approach will be used. If the symbols in your environment are in a different location, modify
the steps to use that location. For additional information, see Symbol Stores and Symbol Servers.
Note
Understand source code symbol requirements
To perform source debugging, you must build a checked (debug) version of your binaries. The compiler will
create symbol files (.pdb files). These symbol files will show the debugger how the binary instructions
correspond to the source lines. The actual source files themselves must also be accessible to the debugger.
The symbol files do not contain the text of the source code. For debugging, it is best if the linker does not
optimize your code. Source debugging and access to local variables are more difficult, and sometimes nearly
impossible, if the code has been optimized. If you are having problems viewing local variables or source lines,
set the following build options:
set COMPILE_DEBUG=1
set ENABLE_OPTIMIZER=0
1. Type the following in the command area of the debugger to display information about the echo driver :
0: kd> lm m echo* v
Browse full module list
start end module name
fffff801`4ae80000 fffff801`4ae89000 ECHO (private pdb symbols)
C:\Samples\KMDF_ECHO_SAMPLE\echo.pdb
Loaded symbol image file: ECHO.sys
Image path: \SystemRoot\system32\DRIVERS\ECHO.sys
Image name: ECHO.sys
...
0: kd> x /D Echo!a*
3. As it turns out, the echo sample doesn’t contain any symbols that start with the letter “a”, so type
x ECHO!Echo* to display information about all of the symbols associated with echo driver that start with
Echo.
0: kd> x ECHO!Echo*
fffff801`0bf95690 ECHO!EchoEvtIoQueueContextDestroy (void *)
fffff801`0bf95000 ECHO!EchoEvtDeviceSelfManagedIoStart (struct WDFDEVICE__ *)
fffff801`0bf95ac0 ECHO!EchoEvtTimerFunc (struct WDFTIMER__ *)
fffff801`0bf9b120 ECHO!EchoEvtDeviceSelfManagedIoSuspend (struct WDFDEVICE__ *)
...
Some drivers will display additional information when the mask of 0xFFFFFFFF is used. Set the mask to
0x00000000 if you would like to reduce the amount of information that is displayed.
Use the dd command to display confirm the mask is set to display all of the debugger messages.
0: kd> dd nt!kd_DEFAULT_MASK
fffff802`bb4057c0 ffffffff 00000000 00000000 00000000
fffff802`bb4057d0 00000000 00000000 00000000 00000000
fffff802`bb4057e0 00000001 00000000 00000000 00000000
fffff802`bb4057f0 00000000 00000000 00000000 00000000
fffff802`bb405800 00000000 00000000 00000000 00000000
fffff802`bb405810 00000000 00000000 00000000 00000000
fffff802`bb405820 00000000 00000000 00000000 00000000
fffff802`bb405830 00000000 00000000 00000000 00000000
2. Use Ctrl+F to search in the output that is generated to look for the name of the device driver, echo.
3. The echo device driver should be loaded. Use the !devnode 0 1 echo command to display Plug and
Play information associated with our echo device driver as shown below.
4. The output displayed in the previous command includes the PDO associated with the running instance of
our driver, in this example it is 0xffffe0007b71a960. Enter the !devobj <PDO address> command to
display Plug and Play information associated with the echo device driver. Use the PDO address that
!devnode displays on your PC, not the one shown here.
5. The output displayed in the !devnode 0 1 command includes the PDO address associated with the
running instance of our driver, in this example it is 0xffffe0007b71a960. Enter the !devstack <PDO
address> command to display Plug and Play information associated with the device driver. Use the PDO
address that !devnode displays on your PC, not the one shown below.
0: kd> !devstack 0xffffe0007b71a960
!DevObj !DrvObj !DevExt ObjectName
ffffe000801fee20 \Driver\ECHO ffffe0007f72eff0
> ffffe0007b71a960 \Driver\PnpManager 00000000 0000000e
!DevNode ffffe0007b71a630 :
DeviceInst is "ROOT\SAMPLE\0000"
ServiceName is "ECHO"
The output shows that we have a fairly simple device driver stack. The echo driver is a child of the PnPManager
node. The PnPManager is a root node.
\Driver\ECHO
\Driver\PnpManager
This diagram shows a more complex device node tree.
Note For more information about more complex driver stacks, see Driver stacks and Device nodes and device
stacks.
For more information, see Source Code Debugging in WinDbg in the debugging reference documentation.
<-On the host system
1. Use the WinDbg UI to confirm that Debug > Source Mode is enabled in the current WinDbg session.
2. Add your local code location to the source path by typing the following command.
.srcpath+ C:\DriverSamples\KMDF_Echo_Sample\driver\AutoSync
3. Add your local symbol location to the symbol path by typing the following command.
.sympath+ C:\DriverSamples\KMDF_Echo_Sample\driver\AutoSync
4. We will use the x command to examine the symbols associated with the echo driver to determine the
function name to use for the breakpoint. We can use a wild card or Ctrl+F to locate the DeviceAdd
function name.
0: kd> x ECHO!EchoEvt*
8b4c7490 ECHO!EchoEvtIoQueueContextDestroy (void *)
8b4c7000 ECHO!EchoEvtDeviceSelfManagedIoStart (struct WDFDEVICE__ *)
8b4c7820 ECHO!EchoEvtTimerFunc (struct WDFTIMER__ *)
8b4cb0e0 ECHO!EchoEvtDeviceSelfManagedIoSuspend (struct WDFDEVICE__ *)
8b4c75d0 ECHO!EchoEvtIoWrite (struct WDFQUEUE__ *, struct WDFREQUEST__ *, unsigned int)
8b4cb170 ECHO!EchoEvtDeviceAdd (struct WDFDRIVER__ *, struct
…
The output above shows that DeviceAdd method for our echo driver is ECHO!EchoEvtDeviceAdd.
Alternatively, we could review the source code to locate the desired function name for our breakpoint.
5. Set the breakpoint with the bm command using the name of the driver, followed by the function name
(for example AddDevice ) where you want to set the breakpoint, separated by an exclamation mark. We
will use AddDevice to watch the driver being loaded.
0: kd> bm ECHO!EchoEvtDeviceAdd
1: fffff801`0bf9b1c0 @!"ECHO!EchoEvtDeviceAdd"
Note
You can use different syntax in conjunction with setting variables like <module>!<symbol>, <class>::
<method>,‘<file.cpp>:<line number>’, or skip a number of times <condition> <#>. For more
information, see Conditional breakpoints in WinDbg and other Windows debuggers.
6. List the current breakpoints to confirm that the breakpoint was set by typing the bl command.
0: kd> bl
1 e fffff801`0bf9b1c0 0001 (0001) ECHO!EchoEvtDeviceAdd
The "e" in the output shown above indicates that the breakpoint number 1 is enabled to fire.
7. Restart code execution on the target system by typing the go command g .
8. -> On the target system
In Windows, open Device Manager using the icon or by entering mmc devmgmt.msc . In Device
Manager, expand the Samples node.
9. Select and hold (or right-click) the KMDF Echo driver entry and select Disable from the menu.
10. Select and hold (or right-click) the KMDF Echo driver entry again and select Enable from the menu.
11. <- On the host system
When the driver is enabled, the AddDevice debug breakpoint should fire, and the execution of the driver
code on the target system should halt. When the breakpoint is hit, the execution should be stopped at the
start of the AddDevice routine. The debug command output will display "Breakpoint 1 hit".
12. Step through the code line-by-line by typing the p command or pressing F10 until you reach the
following end of the AddDevice routine. The Brace character “}” will be highlighted as shown.
13. In the next section, we will examine the state of the variables after the DeviceAdd code has executed.
Note
Modifying breakpoint state
You can modify existing breakpoints by using the following commands:
bl Lists breakpoints.
Alternatively, you can also modify breakpoints by selecting edit > breakpoints in WinDbg. Note that the
breakpoint dialog box only works with existing breakpoints. New breakpoints must be set from the command
line.
Note
Setting memor y access breakpoints
You can also set breakpoints that fire when a memory location is accessed. Use the ba (break on access)
command, with the following syntax.
O P T IO N DESC RIP T IO N
Note that you can only set four data breakpoints at any given time and it is up to you to make sure that you are
aligning your data correctly or you won’t trigger the breakpoint (words must end in addresses divisible by 2,
dwords must be divisible by 4, and quadwords by 0 or 8).
For example, to set a read/write breakpoint on a specific memory address, you could use a command like this.
ba r 4 0x0003f7bf0
Note
Stepping through code from the Debugger Command window
The following are the commands that you can use to step through your code (with the associated keyboard
short cuts shown in parentheses).
Break in (Ctrl+Break) - This command will interrupt a system as long as the system is running and is in
communication with WinDbg (the sequence in the Kernel Debugger is Ctrl+C).
Run to cursor (F7 or Ctrl+F10) – Place the cursor in a source or disassembly window where you want the
execution to break, then press F7; code execution will run to that point. Note that if the flow of code
execution does not reach the point indicated by the cursor (an IF statement isn't executed), WinDbg would
not break, because the code execution did not reach the indicated point.
Run (F5) – Run until a breakpoint is encountered or an event like a bug check occurs.
Step over (F10) – This command causes code execution to proceed one statement or one instruction at a
time. If a call is encountered, code execution passes over the call without entering the called routine. (If
the programming language is C or C++ and WinDbg is in source mode, source mode can be turned on
or off using Debug >Source Mode ).
Step in (F11) – This command is like step-over, except that the execution of a call does go into the called
routine.
Step out (Shift+F11) – This command causes execution to run to and exit from the current routine
(current place in the call stack). This is useful if you've seen enough of the routine.
For more information, see Source Code Debugging in WinDbg in the debugging reference documentation.
Global variables
You can find the location of a global variable address by typing ? <variable name>.
Local variables
You can display the names and values of all local variables for a given frame by typing the dv command.
0: kd> dv
Driver = 0x00001fff`7ff9c838
DeviceInit = 0xffffd001`51978190
status = 0n0
Callstacks
Note
The call stack is the chain of function calls that have led to the current location of the program counter. The top
function on the call stack is the current function, and the next function is the function that called the current
function, and so on.
To display the call stack, use the k* commands.
2. Use the kn command to show the call stack while debugging the sample adapter code in a break state.
3: kd> kn
# Child-SP RetAddr Call Site
00 ffffd001`51978110 fffff801`0942f55b ECHO!EchoEvtDeviceAdd+0x66 [c:\Samples\kmdf echo
sample\c++\driver\autosync\driver.c @ 138]
01 (Inline Function) --------`-------- Wdf01000!FxDriverDeviceAdd::Invoke+0x30
[d:\wbrtm\minkernel\wdf\framework\shared\inc\private\common\fxdrivercallbacks.hpp @ 61]
02 ffffd001`51978150 fffff801`eed8097d Wdf01000!FxDriver::AddDevice+0xab
[d:\wbrtm\minkernel\wdf\framework\shared\core\km\fxdriverkm.cpp @ 72]
03 ffffd001`51978570 fffff801`ef129423 nt!PpvUtilCallAddDevice+0x35
[d:\9142\minkernel\ntos\io\pnpmgr\verifier.c @ 104]
04 ffffd001`519785b0 fffff801`ef0c4112 nt!PnpCallAddDevice+0x63 [d:\9142\minkernel\ntos\io\pnpmgr\enum.c @
7397]
05 ffffd001`51978630 fffff801`ef0c344f nt!PipCallDriverAddDevice+0x6e2
[d:\9142\minkernel\ntos\io\pnpmgr\enum.c @ 3390]
...
The call stack shows that the kernel (nt) called into Plug and Play code (PnP), that called driver framework code
(WDF) that subsequently called the echo driver DeviceAdd function.
0: kd> dv ECHO!EchoEvtIo*
ECHO!EchoEvtIoQueueContextDestroy
ECHO!EchoEvtIoWrite
ECHO!EchoEvtIoRead
0: kd> bc *
3. c. Set a symbol breakpoint on the EchoEvtIo routines using the following command.
0: kd> bm ECHO!EchoEvtIo*
2: aade5490 @!”ECHO!EchoEvtIoQueueContextDestroy”
3: aade55d0 @!”ECHO!EchoEvtIoWrite”
4: aade54c0 @!”ECHO!EchoEvtIoRead”
0: kd> bl
1 e aabf0490 [c:\Samples\kmdf echo sample\c++\driver\autosync\queue.c @ 197] 0001 (0001)
ECHO!EchoEvtIoQueueContextDestroy
...
Breakpoint 2 hit
ECHO!EchoEvtIoWrite:
fffff801`0bf95810 4c89442418 mov qword ptr [rsp+18h],r8
8. Use the !process command to display the current process that is involved in running echoapp.exe.
0: kd> !process
PROCESS ffffe0007e6a7780
SessionId: 1 Cid: 03c4 Peb: 7ff7cfec4000 ParentCid: 0f34
DirBase: 1efd1b000 ObjectTable: ffffc001d77978c0 HandleCount: 34.
Image: echoapp.exe
VadRoot ffffe000802c79f0 Vads 30 Clone 0 Private 135. Modified 5. Locked 0.
DeviceMap ffffc001d83c6e80
Token ffffc001cf270050
ElapsedTime 00:00:00.052
UserTime 00:00:00.000
KernelTime 00:00:00.000
QuotaPoolUsage[PagedPool] 33824
QuotaPoolUsage[NonPagedPool] 4464
Working Set Sizes (now,min,max) (682, 50, 345) (2728KB, 200KB, 1380KB)
PeakWorkingSetSize 652
VirtualSize 16 Mb
PeakVirtualSize 16 Mb
PageFaultCount 688
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 138
The output shows that the process is associated with the echoapp.exe which was running when our
breakpoint on the driver write event was hit. For more information, see !process .
9. Use the !process 0 0 to display summary information for all processes. In the output, use CTRL+F to
locate the same process address for the process associated with the echoapp.exe image. In the example
shown below, the process address is ffffe0007e6a7780.
...
PROCESS ffffe0007e6a7780
SessionId: 1 Cid: 0f68 Peb: 7ff7cfe7a000 ParentCid: 0f34
DirBase: 1f7fb9000 ObjectTable: ffffc001cec82780 HandleCount: 34.
Image: echoapp.exe
...
10. Record the process ID associated with echoapp.exe to use later in this lab. You can also use CTRL+C, to
copy the address to the copy buffer for later use.
_____________________________________________________(echoapp.exe process address)
11. Enter g as required into the debugger to run the code forward until the echoapp.exe finishes running. It
will hit the breakpoint in the read and write event a number of times. When echoapp.exe finishes, break in
to the debugger, by pressing CTRL+ScrLk (Ctrl+Break).
12. Use the !process command to confirm that you are now running a different process. In the output
shown below, the process with the Image value of System is different from the Echo Image value.
1: kd> !process
PROCESS ffffe0007b65d900
SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000
DirBase: 001ab000 ObjectTable: ffffc001c9a03000 HandleCount: 786.
Image: System
VadRoot ffffe0007ce45930 Vads 14 Clone 0 Private 22. Modified 131605. Locked 64.
DeviceMap ffffc001c9a0c220
Token ffffc001c9a05530
ElapsedTime 21:31:02.516
...
The output above shows that a system process ffffe0007b65d900 was running, when we stopped the OS.
13. Now, use the !process command to try to look at the process ID that had been associated with
echoapp.exe that you recorded earlier. Provide your echoapp.exe process address that you recorded
earlier, instead of the example process address shown below.
The process object is no longer available, as the echoapp.exe process is no longer running.
Threads
Note
The commands to view and set threads are very similar to those of processes. Use the !thread command to
view threads. Use .thread to set the current threads.
1. <- On the host system
Enter g into the debugger to restart code execution on the target system.
2. -> On the target system
Run the EchoApp.exe driver test program on the target system.
3. <- On the host system
The breakpoint will be hit and code execution will halt.
Breakpoint 4 hit
ECHO!EchoEvtIoRead:
aade54c0 55 push ebp
4. To view the threads that are running, type !thread . Information similar to the following should be
displayed:
0: kd> !thread
THREAD ffffe000809a0880 Cid 0b28.1158 Teb: 00007ff7d00dd000 Win32Thread: 0000000000000000 RUNNING
on processor 0
IRP List:
ffffe0007bc5be10: (0006,01f0) Flags: 00060a30 Mdl: 00000000
Not impersonating
DeviceMap ffffc001d83c6e80
Owning Process ffffe0008096c900 Image: echoapp.exe
...
Note the image name of echoapp.exe, indicating that we are looking at the thread associated with the test
app.
5. d. Use the !process command to determine if this is the only thread running in the process associated
with echoapp.exe. Note that the thread number of the running thread in the process is the same
thread running that the !thread command displayed.
0: kd> !process
PROCESS ffffe0008096c900
SessionId: 1 Cid: 0b28 Peb: 7ff7d00df000 ParentCid: 0f34
DirBase: 1fb746000 ObjectTable: ffffc001db6b52c0 HandleCount: 34.
Image: echoapp.exe
VadRoot ffffe000800cf920 Vads 30 Clone 0 Private 135. Modified 8. Locked 0.
DeviceMap ffffc001d83c6e80
Token ffffc001cf5dc050
ElapsedTime 00:00:00.048
UserTime 00:00:00.000
KernelTime 00:00:00.000
QuotaPoolUsage[PagedPool] 33824
QuotaPoolUsage[NonPagedPool] 4464
Working Set Sizes (now,min,max) (681, 50, 345) (2724KB, 200KB, 1380KB)
PeakWorkingSetSize 651
VirtualSize 16 Mb
PeakVirtualSize 16 Mb
PageFaultCount 686
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 138
6. Use the !process 0 0 command to locate the process address of two related processes and record
those process address here.
Cmd.exe: ____________________________________________________________
EchoApp.exe: _______________________________________________________
0: kd> !process 0 0
PROCESS ffffe0007bbde900
SessionId: 1 Cid: 0f34 Peb: 7ff72dfa7000 ParentCid: 0c64
DirBase: 19c5fa000 ObjectTable: ffffc001d8c2f300 HandleCount: 31.
Image: cmd.exe
…
PROCESS ffffe0008096c900
SessionId: 1 Cid: 0b28 Peb: 7ff7d00df000 ParentCid: 0f34
DirBase: 1fb746000 ObjectTable: ffffc001db6b52c0 HandleCount: 34.
Image: echoapp.exe
…
Note You can alternatively use !process 0 17 to display detailed information about every process. The
output from this command can be lengthy. The output can be searched using Ctrl+F.
7. Use the !process command to list process information for both processes running your PC. Provide the
process address from your !process 0 0 output, not the address shown below.
This example output is for the cmd.exe process ID that was recorded earlier. Note that the image name for
this process ID is cmd.exe.
This example output is for the echoapp.exe process ID that was recorded earlier.
0: kd> !process ffffe0008096c900
PROCESS ffffe0008096c900
SessionId: 1 Cid: 0b28 Peb: 7ff7d00df000 ParentCid: 0f34
DirBase: 1fb746000 ObjectTable: ffffc001db6b52c0 HandleCount: 34.
Image: echoapp.exe
VadRoot ffffe000800cf920 Vads 30 Clone 0 Private 135. Modified 8. Locked 0.
DeviceMap ffffc001d83c6e80
Token ffffc001cf5dc050
ElapsedTime 00:00:00.048
UserTime 00:00:00.000
KernelTime 00:00:00.000
QuotaPoolUsage[PagedPool] 33824
QuotaPoolUsage[NonPagedPool] 4464
Working Set Sizes (now,min,max) (681, 50, 345) (2724KB, 200KB, 1380KB)
PeakWorkingSetSize 651
VirtualSize 16 Mb
PeakVirtualSize 16 Mb
PageFaultCount 686
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 138
8. Record the first thread address associated with the two processes here.
Cmd.exe: ____________________________________________________
EchoApp.exe: _________________________________________________
9. Use the !Thread command to display information about the current thread.
0: kd> !Thread
THREAD ffffe000809a0880 Cid 0b28.1158 Teb: 00007ff7d00dd000 Win32Thread: 0000000000000000 RUNNING
on processor 0
IRP List:
ffffe0007bc5be10: (0006,01f0) Flags: 00060a30 Mdl: 00000000
Not impersonating
DeviceMap ffffc001d83c6e80
Owning Process ffffe0008096c900 Image: echoapp.exe
Attached Process N/A Image: N/A
...
As expected, the current thread is the thread associated with echoapp.exe and it is in a running state.
10. Use the !Thread command to display information about the thread associated with cmd.exe process.
Provide the thread address you recorded earlier.
0: kd> !Thread ffffe0007cf34880
THREAD ffffe0007cf34880 Cid 0f34.0f1c Teb: 00007ff72dfae000 Win32Thread: 0000000000000000 WAIT:
(UserRequest) UserMode Non-Alertable
ffffe0008096c900 ProcessObject
Not impersonating
DeviceMap ffffc001d83c6e80
Owning Process ffffe0007bbde900 Image: cmd.exe
Attached Process N/A Image: N/A
Wait Start TickCount 4134621 Ticks: 0
Context Switch Count 4056 IdealProcessor: 0
UserTime 00:00:00.000
KernelTime 00:00:01.421
Win32 Start Address 0x00007ff72e9d6e20
Stack Init ffffd0015551dc90 Current ffffd0015551d760
Base ffffd0015551e000 Limit ffffd00155518000 Call 0
Priority 14 BasePriority 8 UnusualBoost 3 ForegroundBoost 2 IoPriority 2 PagePriority 5
Child-SP RetAddr : Args to Child
: Call Site
ffffd001`5551d7a0 fffff801`eed184fe : fffff801`eef81180 ffffe000`7cf34880 00000000`fffffffe
00000000`fffffffe : nt!KiSwapContext+0x76 [d:\9142\minkernel\ntos\ke\amd64\ctxswap.asm @ 109]
ffffd001`5551d8e0 fffff801`eed17f79 : ffff03a5`ca56a3c8 000000de`b6a6e990 000000de`b6a6e990
00007ff7`d00df000 : nt!KiSwapThread+0x14e [d:\9142\minkernel\ntos\ke\thredsup.c @ 6347]
ffffd001`5551d980 fffff801`eecea340 : ffffd001`5551da18 00000000`00000000 00000000`00000000
00000000`00000388 : nt!KiCommitThreadWait+0x129 [d:\9142\minkernel\ntos\ke\waitsup.c @ 619]
...
12. Use the k command to view the call stack associated with the waiting thread.
0: kd> k
*** Stack trace for last set context - .thread/.cxr resets it
# Child-SP RetAddr Call Site
00 ffffd001`5551d7a0 fffff801`eed184fe nt!KiSwapContext+0x76
[d:\9142\minkernel\ntos\ke\amd64\ctxswap.asm @ 109]
01 ffffd001`5551d8e0 fffff801`eed17f79 nt!KiSwapThread+0x14e [d:\9142\minkernel\ntos\ke\thredsup.c @
6347]
02 ffffd001`5551d980 fffff801`eecea340 nt!KiCommitThreadWait+0x129
[d:\9142\minkernel\ntos\ke\waitsup.c @ 619]
03 ffffd001`5551da00 fffff801`ef02e642 nt!KeWaitForSingleObject+0x2c0
[d:\9142\minkernel\ntos\ke\wait.c @ 683]
...
Call stack elements such as KiCommitThreadWait indicate that this thread is not running as is expected.
Note
For more information about threads and processes, see the following references:
Threads and Processes
Changing Contexts
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 2 (DISPATCH_LEVEL)
0: kd> r
rax=000000000000c301 rbx=ffffe00173eed880 rcx=0000000000000001
rdx=000000d800000000 rsi=ffffe00173eed8e0 rdi=ffffe00173eed8f0
rip=fffff803bb757020 rsp=ffffd001f01f8988 rbp=ffffe00173f0b620
r8=000000000000003e r9=ffffe00167a4a000 r10=000000000000001e
r11=ffffd001f01f88f8 r12=0000000000000000 r13=ffffd001f01efdc0
r14=0000000000000001 r15=0000000000000000
iopl=0 nv up ei pl nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000202
nt!DbgBreakPointWithStatus:
fffff803`bb757020 cc int 3
Alternatively, you can display the contents of the registers by selecting view > registers . For more information
see r (Registers) .
Viewing the contents of the registers can be helpful when stepping through assembly language code execution
and in other scenarios. For more information about assembly language disassembly, see Annotated x86
Disassembly and Annotated x64 Disassembly.
For information about contents of the register, see x86 Architecture and x64 Architecture.
Ending the WinDbg session
<-On the host system
To end a user-mode debugging session, return the debugger to dormant mode, and set the target application to
run again, enter the qd (Quit and Detach) command.
Be sure and use the g command to let the target computer run code, so that it can be used. It also a good idea to
clear any break points using bc * , so that the target computer won't break and try to connect to the host
computer debugger.
0: kd> qd
For more information, see Ending a Debugging Session in WinDbg in the debugging reference documentation.
Related topics
Standard Debugging Techniques
Specialized Debugging Techniques
Getting Started with Windows Debugging
Debug Drivers - Step by Step Lab (Sysvad Kernel
Mode)
6/16/2021 • 55 minutes to read • Edit Online
This lab provides hands-on exercises that demonstrate how to debug the Sysvad audio kernel-mode device
driver.
Microsoft Windows Debugger (WinDbg) is a powerful Windows-based debugging tool that you can use to
perform user-mode and kernel-mode debugging. WinDbg provides source-level debugging for the Windows
kernel, kernel-mode drivers, and system services, as well as user-mode applications and drivers.
WinDbg can step through source code, set breakpoints, view variables (including C++ objects), stack traces, and
memory. Its Debugger Command window allows the user to issue a wide variety of commands.
Lab setup
You will need the following hardware to be able to complete the lab:
A laptop or desktop computer (host) running Windows 10
A laptop or desktop computer (target) running Windows 10
A network hub/router and network cables to connect the two PCs
Access to the internet to download symbol files
You will need the following software to be able to complete the lab.
Microsoft Visual Studio 2017
Windows Software Development Kit (SDK) for Windows 10
Windows Driver Kit (WDK) for Windows 10
The sample Sysvad audio driver for Windows 10
For information on downloading and installing the WDK, see Download the Windows Driver Kit (WDK).
To work with kernel-mode applications and use WinDbg, we recommend that you use the KDNET over Ethernet
transport. For information about how to use the Ethernet transport protocol, see Getting Started with WinDbg
(Kernel-Mode). For more information about setting up the target computer, see Preparing a Computer for
Manual Driver Deployment and Setting Up KDNET Network Kernel Debugging Automatically.
Configure kernel–mode debugging using ethernet
To enable kernel-mode debugging on the target system, perform the following steps.
<- On the host system
1. Open a command prompt on the host system and type ipconfig /all to determine its IP address.
C:\>ipconfig /all
Windows IP Configuration
To use the KDNET utility to enable kernel-mode debugging on the target system, peform the following steps.
1. On the host system, locate the WDK KDNET directory. By default it is located here.
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
NOTE
This labs assumes that both PCs are running a 64 bit version of Windowson both the target and host. If that is not the
case, the best approach is to run the same "bitness" of tools on the host that the target is running. For example if the
target is running 32 bit Windows, run a 32 version of the debugger on the host. For more information, see Choosing the
32-Bit or 64-Bit Debugging Tools.
2. Locate these two files and copy them to a network share or thumb drive, so that they will be available on
the target computer.
kdnet.exe
VerifiedNICList.xml
3. On the target computer, open a Command Prompt window as Administrator. Enter this command to
validate that the NIC on the target PC is suported.
C:\KDNET>kdnet
4. Type this command to set the IP address of the host system. Use the actual IP address of the host system you
recorded instead of 169.182.1.1 that is shown in the sample output. Pick a unique port address for each
target/host pair that you work with, such as 50010.
IMPORTANT
Before using BCDEdit to change boot information you may need to temporarily suspend Windows security features such
as BitLocker and Secure Boot on the test PC. Re-enable these security features when testing is complete and appropriately
manage the test PC, when the security features are disabled.
5. Type this command to confirm that the dbgsettings are set properly.
Copy the auto generated unique key into a text file, to avoid having to type it in on the host PC. Copy the text file
with the key over to the host system.
Note Firewalls and debuggers
If you receive a pop-up message from the firewall, and you wish to use the debugger, check all three of the
boxes.
2. Launch WinDbg with remote user debug using the following command. The value for the key and port
match what you set earlier using BCDEdit on the target.
The Debugger Command window is the primary debugging information window in WinDbg. You can enter
debugger commands and view the command output in this window.
The Debugger Command window is split into two panes. You type commands in the smaller pane (the
command entry pane) at the bottom of the window and view the command output in the larger pane at the top
of the window.
In the command entry pane, use the up arrow and down arrow keys to scroll through the command history.
When a command appears, you can edit it or press ENTER to run the command.
The Debugger help file will display help for the .prefer_dml command.
0: kd> vertarget
Windows 10 Kernel Version 9926 MP (4 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 9926.0.amd64fre.fbl_awesome1501.150119-1648
Machine Name: ""
Kernel base = 0xfffff801`8d283000 PsLoadedModuleList = 0xfffff801`8d58aef0
Debug session time: Fri Feb 20 10:15:17.807 2015 (UTC - 8:00)
System Uptime: 0 days 01:31:58.931
0: Kd> lm
start end module name
fffff801`09200000 fffff801`0925f000 volmgrx (no symbols)
fffff801`09261000 fffff801`092de000 mcupdate_GenuineIntel (no symbols)
fffff801`092de000 fffff801`092ec000 werkernel (export symbols) werkernel.sys
fffff801`092ec000 fffff801`0934d000 CLFS (export symbols) CLFS.SYS
fffff801`0934d000 fffff801`0936f000 tm (export symbols) tm.sys
fffff801`0936f000 fffff801`09384000 PSHED (export symbols) PSHED.dll
fffff801`09384000 fffff801`0938e000 BOOTVID (export symbols) BOOTVID.dll
fffff801`0938e000 fffff801`093f7000 spaceport (no symbols)
fffff801`09400000 fffff801`094cf000 Wdf01000 (no symbols)
fffff801`094d9000 fffff801`09561000 CI (export symbols) CI.dll
...
Note Output that has been omitted is indicated with "… " in this lab.
Because we have yet to set the symbol path and loaded symbols, limited information is available in the
debugger.
This lab, shows how to download the universal driver samples in one zip file.
a. Download the master.zip file to your local hard drive.
https://github.com/Microsoft/Windows-driver-samples/archive/master.zip
b. Select and hold (or right-click) Windows-driver-samples-master.zip, and choose Extract All . Specify a
new folder, or browse to an existing one that will store the extracted files. For example, you could specify
C:\WDK_Samples\ as the new folder into which the files are extracted.
c. After the files are extracted, navigate to the following subfolder.
C:\WDK_Samples\Sysvad
2. Open the driver solution in Visual Studio
In Visual Studio, select File > Open > Project/Solution... and navigate to the folder that contains the
extracted files (for example, C:\WDK_Samples\Sysvad). Double-click the Syvad solution file.
In Visual Studio locate the Solution Explorer. (If this is not already open, choose Solution Explorer from
the View menu.) In Solution Explorer, you can see one solution that has a number of projects.
F IL E N A M E DESC RIP T IO N
7. Locate a USB thumb drive or set up a network share to copy the built driver files from the host to the
target system.
In the next section, you will copy the code to the target system, and install and test the driver.
Section 4: Install the Sysvad audio driver sample on the target system
In Section 4, you will use devcon to install the Sysvad audio driver.
-> On the target system
The computer where you install the driver is called the target computer or the test computer. Typically, this is a
separate computer from the computer on which you develop and build the driver package. The computer where
you develop and build the driver is called the host computer.
The process of moving the driver package to the target computer and installing the driver is called deploying the
driver.
Before you deploy a driver, you must prepare the target computer by turning on test signing. After that you’re
ready to run the built driver sample on the target system.
To install the driver on the target system, perform the following steps.
1. Enable test signed drivers
To enable the ability to run test signed drivers:
a. Open Windows Settings.
b. In Update and Security , select Recover y .
c. Under Advanced star tup , select Restar t Now .
d. When the PC restarts, select Troubleshoot .
e. Then select Advanced options , Star tup Settings and then select Restar t .
f. Select Disable driver signature enforcement by pressing the F7 key.
g. The PC will start with the new values in place.
2. -> On the target system
Install the driver
The following instructions show you how to install and test the sample driver.
The INF file required for installing this driver is TabletAudioSample.inf. On the target computer, open a
Command Prompt window as Administrator. Navigate to your driver package folder, right-click the
TabletAudioSample.inf file, and then select Install .
A dialog box will appear indicating that the test driver is an unsigned driver. Select Install this driver
anyway to proceed.
TIP
If you have any issues with the installation, check the following file for more information.
%windir%\inf\setupapi.dev.log
For more detailed instructions, see Configuring a Computer for Driver Deployment, Testing, and
Debugging.
The INF file contains the hardware ID for installing the tabletaudiosample.sys. For the Syvad sample, the
hardware ID is: root\sysvad_TabletAudioSample
3. Examine the driver in Device Manager
On the target computer, in a Command Prompt window, enter devmgmt to open Device Manager. In
Device Manager, on the View menu, select Devices by type .
In the device tree, locate Virtual Audio Device (WDM) - Tablet Sample in the Audio Device node. This is
typically under the Sound, video and game controllers node. Confirm that it is installed and active.
Highlight the driver for the actual hardware on the PC in Device Manager. Then select and hold (or right-
click) the driver and select disable to disable the driver.
Confirm in Device Manager that audio hardware driver, displays the a down arrow, indicating that it is
disabled.
After successfully installing the sample driver, you're now ready to test it.
Test the Sysvad audio driver
1. On the target computer, in a Command Prompt window, enter devmgmt to open Device Manager. In
Device Manager, on the View menu, select Devices by type . In the device tree, locate Virtual Audio
Device (WDM) - Tablet Sample.
2. Open Control Panel and navigate to Hardware and Sound > Manage audio devices . In the Sound
dialog box, select the speaker icon labeled as Virtual Audio Device (WDM) - Tablet Sample, and then
select Set Default , but do not select OK . This will keep the Sound dialog box open.
3. Locate an MP3 or other audio file on the target computer and double-click to play it. Then in the Sound
dialog box, verify that there is activity in the volume level indicator associated with the Virtual Audio
Device (WDM) - Tablet Sample driver.
2. Use Ctrl+Break (Scroll Lock) to break into the code running on the target system.
Set the symbol path
1. To set the symbols path to the Microsoft symbol server in the WinDbg environment, use the .symfix
command.
0: kd> .symfix
2. To add your local symbol location to use your local symbols, add the path using .sympath+ and then
.reload /f .
Note The .reload command with the /f force option deletes all symbol information for the specified
module and reloads the symbols. In some cases, this command also reloads or unloads the module itself.
Note You must load the proper symbols to use advanced functionality that WinDbg provides. If you do not
have symbols properly configured, you will receive messages indicating that symbols are not available when
you attempt to use functionality that is dependent on symbols.
0:000> dv
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
Type “.hh dbgerr005” for details.
0: kd> x /D /f tabletaudiosample!a*
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0: kd> !devnode 0 1
Dumping IopRootDeviceNode (= 0xffffe0005a3a8d30)
DevNode 0xffffe0005a3a8d30 for PDO 0xffffe0005a3a9e50
InstancePath is "HTREE\ROOT\0"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0xffffe0005a3a3d30 for PDO 0xffffe0005a3a4e50
InstancePath is "ROOT\volmgr\0000"
ServiceName is "volmgr"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0xffffe0005a324560 for PDO 0xffffe0005bd95ca0…
...
2. Use Ctrl+F to search in the output that is generated to look for the name of the device driver, sysvad.
A device node entry with a name of sysvad_TabletAudioSample will be present in the !devnode output for
Syvad.
DevNode 0xffffe00086e68190 for PDO 0xffffe00089c575a0
InstancePath is "ROOT\sysvad_TabletAudioSample\0000"
ServiceName is "sysvad_tabletaudiosample"
State = DeviceNodeStarted (0x308)
...
Note that the PDO address and the DevNode address are displayed.
3. Use the !devnode 0 1 sysvad_TabletAudioSample command to display Plug and Play information
associated with our Sysvad device driver.
4. The output displayed in the previous command includes the PDO associated with the running instance of
our driver, in this example it is 0xffffe00089c575a0. Enter the !devobj <PDO address> command to
display Plug and Play information associated with the Sysvad device driver. Use the PDO address that
!devnode displays on your PC, not the one shown here.
0: kd> !devobj 0xffffe00089c575a0
Device object (ffffe00089c575a0) is for:
0000004e \Driver\PnpManager DriverObject ffffe00082d47e60
Current Irp 00000000 RefCount 65 Type 0000001d Flags 00001040
SecurityDescriptor ffffc102b0f6d171 DevExt 00000000 DevObjExt ffffe00089c576f0 DevNode
ffffe00086e68190
ExtensionFlags (0000000000)
Characteristics (0x00000180) FILE_AUTOGENERATED_DEVICE_NAME, FILE_DEVICE_SECURE_OPEN
AttachedDevice (Upper) ffffe00088386a50 \Driver\sysvad_tabletaudiosample
Device queue is not busy.
5. The output displayed in the !devobj command includes the name of the attached device:
\Driver\sysvad_tabletaudiosample. Use the !dr vobj command with a bit mask of 2, to display
information associated with the attached device.
Dispatch routines:
[00] IRP_MJ_CREATE fffff80117b49a20 portcls!DispatchCreate
[01] IRP_MJ_CREATE_NAMED_PIPE fffff8015a949a00 nt!IopInvalidDeviceRequest
[02] IRP_MJ_CLOSE fffff80115e26f90 ks!DispatchCleanup
[03] IRP_MJ_READ fffff80115e32710 ks!DispatchRead
[04] IRP_MJ_WRITE fffff80115e327e0 ks!DispatchWrite
[05] IRP_MJ_QUERY_INFORMATION fffff8015a949a00 nt!IopInvalidDeviceRequest
[06] IRP_MJ_SET_INFORMATION fffff8015a949a00 nt!IopInvalidDeviceRequest
[07] IRP_MJ_QUERY_EA fffff8015a949a00 nt!IopInvalidDeviceRequest
[08] IRP_MJ_SET_EA fffff8015a949a00 nt!IopInvalidDeviceRequest
[09] IRP_MJ_FLUSH_BUFFERS fffff80115e32640 ks!DispatchFlush
[0a] IRP_MJ_QUERY_VOLUME_INFORMATION fffff8015a949a00 nt!IopInvalidDeviceRequest
[0b] IRP_MJ_SET_VOLUME_INFORMATION fffff8015a949a00 nt!IopInvalidDeviceRequest
[0c] IRP_MJ_DIRECTORY_CONTROL fffff8015a949a00 nt!IopInvalidDeviceRequest
[0d] IRP_MJ_FILE_SYSTEM_CONTROL fffff8015a949a00 nt!IopInvalidDeviceRequest
[0e] IRP_MJ_DEVICE_CONTROL fffff80115e27480 ks!DispatchDeviceIoControl
[0f] IRP_MJ_INTERNAL_DEVICE_CONTROL fffff8015a949a00 nt!IopInvalidDeviceRequest
[10] IRP_MJ_SHUTDOWN fffff8015a949a00 nt!IopInvalidDeviceRequest
[11] IRP_MJ_LOCK_CONTROL fffff8015a949a00 nt!IopInvalidDeviceRequest
[12] IRP_MJ_CLEANUP fffff8015a949a00 nt!IopInvalidDeviceRequest
[13] IRP_MJ_CREATE_MAILSLOT fffff8015a949a00 nt!IopInvalidDeviceRequest
[14] IRP_MJ_QUERY_SECURITY fffff80115e326a0 ks!DispatchQuerySecurity
[15] IRP_MJ_SET_SECURITY fffff80115e32770 ks!DispatchSetSecurity
[16] IRP_MJ_POWER fffff80117b3dce0 portcls!DispatchPower
[17] IRP_MJ_SYSTEM_CONTROL fffff80117b13d30 portcls!PcWmiSystemControl
[18] IRP_MJ_DEVICE_CHANGE fffff8015a949a00 nt!IopInvalidDeviceRequest
[19] IRP_MJ_QUERY_QUOTA fffff8015a949a00 nt!IopInvalidDeviceRequest
[1a] IRP_MJ_SET_QUOTA fffff8015a949a00 nt!IopInvalidDeviceRequest
[1b] IRP_MJ_PNP fffff80114b5f7d0 tabletaudiosample!PnpHandler
6. Enter the !devstack <PDO address> command to display Plug and Play information associated with the
device driver. The output displayed in the !devnode 0 1 command includes the PDO address associated
with the running instance of our driver. In this example it is 0xffffe00089c575a0. Use the PDO address
that !devnode displays on your PC, not the one shown below.
0: kd> !devstack 0xffffe00089c575a0
!DevObj !DrvObj !DevExt ObjectName
ffffe00088d212e0 \Driver\ksthunk ffffe00088d21430 0000007b
ffffe00088386a50 \Driver\sysvad_tabletaudiosampleffffe00088386ba0 0000007a
> ffffe00089c575a0 \Driver\PnpManager 00000000 0000004e
!DevNode ffffe00086e68190 :
DeviceInst is "ROOT\sysvad_TabletAudioSample\0000"
ServiceName is "sysvad_tabletaudiosample"
The output shows that we have a farily simple device driver stack. The sysvad_TabletAudioSample driver is a
child of the PnPManager node. The PnPManager is a root node.
This diagram shows a more complex device node tree.
Note For more information about more complex driver stacks, see Driver stacks and Device nodes and device
stacks.
1. Use the WinDbg UI to confirm that Debug > Source Mode is enabled in the current WinDbg session.
2. Add your local code location to the source path by typing the following command.
.sympath+ C:\WDK_Samples\Sysvad
3. Add your local symbol location to the symbol path by typing the following command.
.sympath+ C:\WDK_Samples\Sysvad
5. Set the breakpoint with the bm command using the name of the driver, followed by the function name
(AddDevice) where you want to set the breakpoint, separated by an exclamation mark.
0: kd> bm tabletaudiosample!AddDevice
breakpoint 1 redefined
1: fffff801`14b5f000 @!"tabletaudiosample!AddDevice"
You can use different syntax in conjunction with setting variables like <module>!<symbol>, <class>::
<method>,‘<file.cpp>:<line number>’, or skip a number of times <condition> <#>. For more
information, see Using Breakpoints.
6. List the current breakpoints to confirm that the breakpoint was set by typing the bl command.
0: kd> bl
1 e fffff801`14b5f000 0001 (0001) tabletaudiosample!AddDevice
Breakpoint 1 hit
tabletaudiosample!AddDevice:
fffff801`14baf000 4889542410 mov qword ptr [rsp+10h],rdx
If your source path is set properly, you should stop at the AddDevice routine in adapter.cpp
{
PAGED_CODE();
NTSTATUS ntStatus;
ULONG maxObjects;
DPF(D_TERSE, ("[AddDevice]"));
maxObjects = g_MaxMiniports;
#ifdef SYSVAD_BTH_BYPASS
//
// Allow three (3) Bluetooth hands-free profile devices.
//
maxObjects += g_MaxBthHfpMiniports * 3;
#endif // SYSVAD_BTH_BYPASS
11. Step line-by-line through the code by typing the p command or pressing F10. You can step forward out
of the sysvad AddDevice code to PpvUtilCall, PnpCallAddDevice and then to the PipCallDriverAddDevice
Windows code. You can provide a number to the p command to step forward multiple lines, for example
p 5.
12. When you are done stepping through the code, use the go command g to restart execution on the target
system.
Setting memor y access breakpoints
You can also set breakpoints that fire when a memory location is accessed. Use the ba (break on access)
command, with the following syntax.
O P T IO N DESC RIP T IO N
O P T IO N DESC RIP T IO N
Note that you can only set four data breakpoints at any given time and it is up to you to make sure that you are
aligning your data correctly or you won’t trigger the breakpoint (words must end in addresses divisible by 2,
dwords must be divisible by 4, and quadwords by 0 or 8)
For example, to set a read/write breakpoint on a specific memory address, use a command like this.
ba r 4 fffff800`7bc9eff0
bl Lists breakpoints.
Alternatively, you can also modify breakpoints by selecting edit > breakpoints . Note that the breakpoint dialog
box only works with existing breakpoints. New breakpoints must be set from the command line.
Set a breakpoint on MixerVolume
Different parts of the audio driver code is called to respond to various events, after the device driver is loaded. In
the next section, we set a breakpoint that will fire when the user adjusts the volume control for the virtual audio
driver.
To set a breakpoint on MixerVolume, perform the following steps.
1. <- On the host system
To locate the method that changes the volume, use the x command to list the symbols in
CAdapterCommon, that contain the string volume.
kd> x tabletaudiosample!CAdapterCommon::*
...
fffff800`7bce26a0 tabletaudiosample!CAdapterCommon::MixerVolumeWrite (unsigned long, unsigned long,
long)
…
Use CTRL+F to search upward in the output for volume and locate the MixerVolumeWrite method.
2. Clear the previous breakpoints using bc *.
3. Set a symbol breakpoint on the CAdapterCommon::MixerVolumeWrite routine using the following
command.
kd> bm tabletaudiosample!CAdapterCommon::MixerVolumeWrite
1: fffff801`177b26a0 @!"tabletaudiosample!CAdapterCommon::MixerVolumeWrite"
kd> bl
1 e fffff801`177b26a0 [c:\WDK_Samples\audio\sysvad\common.cpp @ 1668] 0001 (0001)
tabletaudiosample!CAdapterCommon::MixerVolumeWrite
kd> g
Breakpoint 1 hit
tabletaudiosample!CAdapterCommon::MixerVolumeWrite:
fffff801`177b26a0 44894c2420 mov dword ptr [rsp+20h],r9d
{
if (m_pHW)
{
m_pHW->SetMixerVolume(Index, Channel, Value);
}
} // MixerVolumeWrite
8. Use the dv command to display the current variables and their values. More information on variables is
provided in the next section of this lab.
2: kd> dv
this = 0x00000000`00000010
ulNode = 0x344
ulChannel = 0x210a45f8
lVolume = 0n24
...
// Insert the DebugBreak() statment before the PcAddAdapterDevice is called.
//
DebugBreak()
return ntStatus;
} // AddDevice
2. Follow all of the steps previously described to rebuild the driver in Microsoft Visual Studio and re-install it
to the target machine. Be sure to uninstall the existing driver before installing the updated driver.
3. Clear any previous breakpoints and make sure that the debugger is attached to the target PC.
4. When the code runs and reaches the DebugBreak statement, execution will stop and a message will be
displayed.
KERNELBASE!DebugBreak:
77b3b770 defe __debugbreak
kd> dv tabletaudiosample!CMiniportWaveRT::New*
bc *
0: kd> bm tabletaudiosample!CMiniportWaveRT::NewStream
1: fffff801`177dffc0 @!"tabletaudiosample!CMiniportWaveRT::NewStream"
Breakpoint 1 hit
tabletaudiosample!CMiniportWaveRT::NewStream:
fffff801`177dffc0 44894c2420 mov dword ptr [rsp+20h],r9d
The source code Window should be highlighting the brace on the entrance to the NewStream function.
/*++
Routine Description:
Arguments:
OutStream -
OuterUnknown -
Pin -
Capture -
DataFormat -
Return Value:
NT status code.
--*/
{
...
7. Local variables
You can display the names and values of all local variables for a given frame by typing the dv command.
0: kd> dv
this = 0xffffe000`4436f8e0
OutStream = 0xffffe000`49d2f130
OuterUnknown = 0xffffe000`4436fa30
Pin = 0
Capture = 0x01 '
DataFormat = 0xffffe000`44227790
signalProcessingMode = {487E9220-E000-FFFF-30F1-D24900E0FFFF}
ntStatus = 0n1055
stream = 0x00000000`00000200
9. Global variables
You can find the memory location of a global variable by typing ? <variable name> .
0: kd> ? signalProcessingMode
Evaluate expression: -52768896396472 = ffffd001`c8acd348
10. This returns the memory location of the variable, in this case ffffd001`c8acd348. You can view the
contents of the memory location by dumping the value of that location typing the dd command using
the memory location returned by the previous command.
0: kd> dd ffffd001`c8acd348
ffffd001`c8acd348 487e9220 ffffe000 49d2f130 ffffe000
ffffd001`c8acd358 4837c468 ffffe000 18221570 ffffc000
ffffd001`c8acd368 4436f8e0 ffffe000 487e9220 ffffe000
ffffd001`c8acd378 18ab145b fffff801 4837c420 ffffe000
ffffd001`c8acd388 4436f8e0 ffffe000 49d2f130 ffffe000
ffffd001`c8acd398 4436fa30 ffffe000 00000000 00000000
ffffd001`c8acd3a8 00000001 00000000 44227790 ffffe000
ffffd001`c8acd3b8 18adc7f9 fffff801 495972a0 ffffe000
11. You can also use variable names with the dd command.
0: kd> dd signalProcessingMode
ffffd001`c8acd348 487e9220 ffffe000 49d2f130 ffffe000
ffffd001`c8acd358 4837c468 ffffe000 18221570 ffffc000
ffffd001`c8acd368 4436f8e0 ffffe000 487e9220 ffffe000
ffffd001`c8acd378 18ab145b fffff801 4837c420 ffffe000
ffffd001`c8acd388 4436f8e0 ffffe000 49d2f130 ffffe000
ffffd001`c8acd398 4436fa30 ffffe000 00000000 00000000
ffffd001`c8acd3a8 00000001 00000000 44227790 ffffe000
ffffd001`c8acd3b8 18adc7f9 fffff801 495972a0 ffffe000
13. Use p or F10 to step forward about 10 lines in the code until you are highlighting the ntStatus =
IsFormatSupported(Pin, Capture, DataFormat); line of code.
PAGED_CODE();
ASSERT(OutStream);
ASSERT(DataFormat);
DPF_ENTER(("[CMiniportWaveRT::NewStream]"));
*OutStream = NULL;
//
// If the data format attributes were specified, extract them.
//
if ( DataFormat->Flags & KSDATAFORMAT_ATTRIBUTES )
{
// The attributes are aligned (QWORD alignment) after the data format
PKSMULTIPLE_ITEM attributes = (PKSMULTIPLE_ITEM) (((PBYTE)DataFormat) + ((DataFormat-
>FormatSize + FILE_QUAD_ALIGNMENT) & ~FILE_QUAD_ALIGNMENT));
ntStatus = GetAttributesFromAttributeList(attributes, attributes->Size,
&signalProcessingMode);
}
...
14. Use the dv command to display the names and values of all local variables for a given frame. Note that,
as expected, the values are different from the last time we ran this command, as additional code has been
run that changes the local variables and some variables are now not in the current frame or their values
have changed.
2: kd> dv
this = 0xffffe001`d1182000
OutStream = 0xffffe001`d4776d20
OuterUnknown = 0xffffe001`d4776bc8
Pin = 0
Capture = 0x00 '
DataFormat = 0xffffe001`cd7609b0
signalProcessingMode = {4780004E-7133-41D8-8C74-660DADD2C0EE}
ntStatus = 0n0
stream = 0x00000000`00000000
If you want to keep the call stack available, you can select View > Call stack to view it. Select the columns at the
top of the window to toggle the display of additional information.
This output shows the call stack while debugging the sample adapter code in a break state.
0: kd> kb
# RetAddr : Args to Child : Call Site
00 fffff800`7a0fa607 : ffffe001`d1182000 ffffe001`d4776d20 ffffe001`d4776bc8 ffffe001`00000000 :
tabletaudiosample!CMiniportWaveRT::NewStream+0x1dc [c:\data1\threshold\audio\endpointscommon\minwavert.cpp @
597]
01 fffff800`7a0fb2c3 : 00000000`00000000 ffffe001`d122bb10 ffffe001`ceb81750 ffffe001`d173f058 :
portcls!CPortPinWaveRT::Init+0x2e7
02 fffff800`7a0fc7f9 : ffffe001`d4776bc0 00000000`00000000 ffffe001`d10b8380 ffffe001`d122bb10 :
portcls!CPortFilterWaveRT::NewIrpTarget+0x193
03 fffff800`7a180552 : 00000000`00000000 ffffe001`d10b8380 ffffe001`d122bb10 ffffe001`d4565600 :
portcls!xDispatchCreate+0xd9
04 fffff800`7a109a9a : ffffe001`d10b84d0 ffffe001`d10b8380 00000000`00000000 ffffe001`00000000 :
ks!KsDispatchIrp+0x272
05 fffff800`7bd314b1 : ffffe001`d122bb10 ffffd001`c3098590 ffffe001`d122bd90 ffffe001`ce80da70 :
portcls!DispatchCreate+0x7a
06 fffff803`cda1bfa8 : 00000000`00000024 00000000`00000000 00000000`00000000 ffffe001`d122bb10 :
ksthunk!CKernelFilterDevice::DispatchIrp+0xf9
07 fffff803`cda7b306 : 00000000`000001f0 ffffe001`d48ce690 ffffe001`d13d6400 ffffe001`d13d64c0 :
nt!IopParseDevice+0x7c8
08 fffff803`cda12916 : 00000000`000001f0 ffffd001`c30988d0 ffffe001`d13d6490 fffff803`cda7b250 :
nt!IopParseFile+0xb6
09 fffff803`cda1131c : ffffe001`d2ccb001 ffffd001`c30989e0 00ffffe0`00000040 ffffe001`cd127dc0 :
nt!ObpLookupObjectName+0x776
0a fffff803`cd9fedb8 : ffffe001`00000001 ffffe001`d48ce690 00000000`00000000 00000000`00000000 :
nt!ObOpenObjectByNameEx+0x1ec
0b fffff803`cd9fe919 : 000000ee`6d1fc8d8 000000ee`6d1fc788 000000ee`6d1fc7e0 000000ee`6d1fc7d0 :
nt!IopCreateFile+0x3d8
0c fffff803`cd752fa3 : ffffc000`1f296870 fffff803`cd9d9fbd ffffd001`c3098be8 00000000`00000000 :
nt!NtCreateFile+0x79
0d 00007fff`69805b74 : 00007fff`487484e6 0000029b`00000003 00000000`0000012e 00000000`00000000 :
nt!KiSystemServiceCopyEnd+0x13
0e 00007fff`487484e6 : 0000029b`00000003 00000000`0000012e 00000000`00000000 00000000`00000000 :
0x00007fff`69805b74
0f 0000029b`00000003 : 00000000`0000012e 00000000`00000000 00000000`00000000 00000000`00000000 :
0x00007fff`487484e6
10 00000000`0000012e : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000080 :
0x0000029b`00000003
11 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000080 00000000`00000000 : 0x12e
You can use DML to further explore the code. When you select the first 00 entry, the .frame (Set Local
Context) command is used to set the context and then, the dv (Display Local Variables) command displays
the local variables.
0: kd> !process
PROCESS ffffe001d147c840
SessionId: 0 Cid: 10f0 Peb: ee6cf8a000 ParentCid: 0434
DirBase: d2122000 ObjectTable: ffffc0001f191ac0 HandleCount: <Data Not Accessible>
Image: audiodg.exe
VadRoot ffffe001d4222f70 Vads 70 Clone 0 Private 504. Modified 16. Locked 0.
DeviceMap ffffc00019113080
Token ffffc0001f1d4060
ElapsedTime <Invalid>
UserTime 00:00:00.000
KernelTime 00:00:00.000
QuotaPoolUsage[PagedPool] 81632
QuotaPoolUsage[NonPagedPool] 9704
Working Set Sizes (now,min,max) (2154, 1814, 2109) (8616KB, 7256KB, 8436KB)
PeakWorkingSetSize 2101
VirtualSize 2097192 Mb
PeakVirtualSize 2097192 Mb
PageFaultCount 2336
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 1573
Note that one of the threads associated with this process is in the RUNNING state. This thread was supporting
the playing of the media clip when the breakpoint was hit.
Use the !process 0 0 command to display summary information for all processes. In the command output use
CTRL+F to locate the process ID for the process associated with the audiodg.exe image. In the example shown
below, the process ID is ffffe001d147c840.
Record the process ID associated with audiodg.exe on your PC to use later in this lab. ________________________
...
PROCESS ffffe001d147c840
SessionId: 0 Cid: 10f0 Peb: ee6cf8a000 ParentCid: 0434
DirBase: d2122000 ObjectTable: ffffc0001f191ac0 HandleCount: <Data Not Accessible>
Image: audiodg.exe
...
Enter g into the debugger to run the code forward until the media clip is done playing. Then break in to the
debugger, by pressing Ctrl+ScrLk (Ctrl+Break) Use the !process command to confirm that you are now running
a different process.
!process
PROCESS ffffe001cd0ad040
SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000
DirBase: 001aa000 ObjectTable: ffffc00017214000 HandleCount: <Data Not Accessible>
Image: System
VadRoot ffffe001d402b820 Vads 438 Clone 0 Private 13417. Modified 87866. Locked 64.
DeviceMap ffffc0001721a070
Token ffffc00017216a60
ElapsedTime 05:04:54.716
UserTime 00:00:00.000
KernelTime 00:00:20.531
QuotaPoolUsage[PagedPool] 0
QuotaPoolUsage[NonPagedPool] 0
Working Set Sizes (now,min,max) (1720, 50, 450) (6880KB, 200KB, 1800KB)
PeakWorkingSetSize 15853
VirtualSize 58 Mb
PeakVirtualSize 74 Mb
PageFaultCount 46128
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 66
The output above shows that a different system process of ffffe001cd0ad040 is running. The image name shows
System, not audiodg.exe.
Now use the !process command to switch to the process that was associated with audiodg.exe. In the example,
the process ID is ffffe001d147c840. Substitute the process ID in the example with your process ID, that you
recorded earlier.
Because this code is not active, all of the threads are in WAIT state, as expected.
Threads
The commands to view and set threads are very similar to those of processes. Use the !thread command to
view threads. Use .thread to set the current threads.
To explore threads associated with the media player, play the media clip again. If the breakpoint described in the
previous section is still in place, you will stop in the context of audiodg.exe.
Use the !thread -1 0 to display brief information for the current thread. This shows the thread address, the
thread and process IDs, the thread environment block (TEB) address, the address of the Win32 function (if any)
the thread was created to run, and the thread’s scheduling state.
0: kd> !thread -1 0
THREAD ffffe001d3a27040 Cid 10f0.17f4 Teb: 000000ee6cf9d000 Win32Thread: 0000000000000000 RUNNING on
processor 0
To view more information about the thread that is running, type !thread . Information similar to the following
should be displayed.
0: kd> !thread
THREAD ffffe001d3a27040 Cid 10f0.17f4 Teb: 000000ee6cf9d000 Win32Thread: 0000000000000000 RUNNING on
processor 0
IRP List:
ffffe001d429e580: (0006,02c8) Flags: 000008b4 Mdl: 00000000
Not impersonating
DeviceMap ffffc00019113080
Owning Process ffffe001d147c840 Image: audiodg.exe
Attached Process N/A Image: N/A
Wait Start TickCount 537630 Ticks: 0
Context Switch Count 63 IdealProcessor: 1
UserTime 00:00:00.000
KernelTime 00:00:00.015
Win32 Start Address 0x00007fff6978b350
Stack Init ffffd001c70c6dd0 Current ffffd001c70c6520
Base ffffd001c70c7000 Limit ffffd001c70c1000 Call 0
Priority 8 BasePriority 8 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
Child-SP RetAddr : Args to Child
: Call Site
ffffd001`c70c62a8 fffff800`7a0fa607 : ffffe001`d4aec5c0 ffffe001`cdefd3d8 ffffe001`d4aec5c0
ffffe001`cdefd390 : tabletaudiosample!CMiniportWaveRT::NewStream
[c:\data1\threshold\audio\endpointscommon\minwavert.cpp @ 562]
ffffd001`c70c62b0 fffff800`7a0fb2c3 : 00000000`00000000 ffffe001`d429e580 ffffe001`d4ea47b0
ffffe001`cdefd3d8 : portcls!CPortPinWaveRT::Init+0x2e7
ffffd001`c70c6340 fffff800`7a0fc7f9 : ffffe001`d4aec430 00000000`00000000 ffffe001`d10b8380
ffffe001`d429e580 : portcls!CPortFilterWaveRT::NewIrpTarget+0x193
ffffd001`c70c63c0 fffff800`7a180552 : 00000000`00000000 ffffe001`d10b8380 ffffe001`d429e580
ffffe001`d4565600 : portcls!xDispatchCreate+0xd9
ffffd001`c70c6450 fffff800`7a109a9a : ffffe001`d10b84d0 ffffe001`d10b8380 00000000`00000000
ffffe001`00000000 : ks!KsDispatchIrp+0x272
ffffd001`c70c6510 fffff800`7bd314b1 : ffffe001`d429e580 ffffd001`c70c6590 ffffe001`d429e800
ffffe001`ce80da70 : portcls!DispatchCreate+0x7a
ffffd001`c70c6540 fffff803`cda1bfa8 : 00000000`00000025 00000000`00000000 00000000`00000000
ffffe001`d429e580 : ksthunk!CKernelFilterDevice::DispatchIrp+0xf9
ffffd001`c70c65a0 fffff803`cda7b306 : 00000000`000002fc ffffe001`d5e0d510 00000000`00000000
ffffe001`d3341bd0 : nt!IopParseDevice+0x7c8
ffffd001`c70c6770 fffff803`cda12916 : 00000000`000002fc ffffd001`c70c68d0 ffffe001`d3341ba0
fffff803`cda7b250 : nt!IopParseFile+0xb6
ffffd001`c70c67d0 fffff803`cda1131c : ffffe001`ceb6c601 ffffd001`c70c69e0 00000000`00000040
ffffe001`cd127dc0 : nt!ObpLookupObjectName+0x776
ffffd001`c70c6970 fffff803`cd9fedb8 : ffff8ab8`00000001 ffffe001`d5e0d510 00000000`00000000
00000000`00000000 : nt!ObOpenObjectByNameEx+0x1ec
ffffd001`c70c6a90 fffff803`cd9fe919 : 000000ee`6d37c6e8 00000004`6d37c500 000000ee`6d37c5f0
000000ee`6d37c5e0 : nt!IopCreateFile+0x3d8
ffffd001`c70c6b40 fffff803`cd752fa3 : fffff6fb`7da05360 fffff6fb`40a6c0a8 fffff681`4d815760
ffff8ab8`92895e23 : nt!NtCreateFile+0x79
ffffd001`c70c6bd0 00007fff`69805b74 : 00007fff`487484e6 0000029b`00000003 00000000`0000012e
00000000`00000000 : nt!KiSystemServiceCopyEnd+0x13 (TrapFrame @ ffffd001`c70c6c40)
000000ee`6d37c568 00007fff`487484e6 : 0000029b`00000003 00000000`0000012e 00000000`00000000
00000000`00000000 : 0x00007fff`69805b74
000000ee`6d37c570 0000029b`00000003 : 00000000`0000012e 00000000`00000000 00000000`00000000
00000000`00000000 : 0x00007fff`487484e6
000000ee`6d37c578 00000000`0000012e : 00000000`00000000 00000000`00000000 00000000`00000000
00000000`00000080 : 0x0000029b`00000003
000000ee`6d37c580 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000080
00000000`00000000 : 0x12e
Use the k command to view the call stack associated with the thread.
0: kd> k
# Child-SP RetAddr Call Site
00 ffffd001`c70c62a8 fffff800`7a0fa607 tabletaudiosample!CMiniportWaveRT::NewStream
[c:\data1\threshold\audio\endpointscommon\minwavert.cpp @ 562]
01 ffffd001`c70c62b0 fffff800`7a0fb2c3 portcls!CPortPinWaveRT::Init+0x2e7
02 ffffd001`c70c6340 fffff800`7a0fc7f9 portcls!CPortFilterWaveRT::NewIrpTarget+0x193
03 ffffd001`c70c63c0 fffff800`7a180552 portcls!xDispatchCreate+0xd9
04 ffffd001`c70c6450 fffff800`7a109a9a ks!KsDispatchIrp+0x272
05 ffffd001`c70c6510 fffff800`7bd314b1 portcls!DispatchCreate+0x7a
06 ffffd001`c70c6540 fffff803`cda1bfa8 ksthunk!CKernelFilterDevice::DispatchIrp+0xf9
07 ffffd001`c70c65a0 fffff803`cda7b306 nt!IopParseDevice+0x7c8
08 ffffd001`c70c6770 fffff803`cda12916 nt!IopParseFile+0xb6
09 ffffd001`c70c67d0 fffff803`cda1131c nt!ObpLookupObjectName+0x776
0a ffffd001`c70c6970 fffff803`cd9fedb8 nt!ObOpenObjectByNameEx+0x1ec
0b ffffd001`c70c6a90 fffff803`cd9fe919 nt!IopCreateFile+0x3d8
0c ffffd001`c70c6b40 fffff803`cd752fa3 nt!NtCreateFile+0x79
0d ffffd001`c70c6bd0 00007fff`69805b74 nt!KiSystemServiceCopyEnd+0x13
0e 000000ee`6d37c568 00007fff`487484e6 0x00007fff`69805b74
0f 000000ee`6d37c570 0000029b`00000003 0x00007fff`487484e6
10 000000ee`6d37c578 00000000`0000012e 0x0000029b`00000003
11 000000ee`6d37c580 00000000`00000000 0x12e
Enter g into the debugger to run the code forward until the media clip is done playing. Then break in to the
debugger, by pressing Ctrl - ScrLk (Ctrl-Break) Use the !thread command to confirm that you are now running a
different thread.
0: kd> !thread
THREAD ffffe001ce80b840 Cid 17e4.01ec Teb: 00000071fa9b9000 Win32Thread: ffffe001d41690d0 RUNNING on
processor 0
Not impersonating
DeviceMap ffffc0001974e2c0
Owning Process ffffe001d1760840 Image: rundll32.exe
Attached Process N/A Image: N/A
Wait Start TickCount 538040 Ticks: 0
Context Switch Count 3181840 IdealProcessor: 0
UserTime 00:00:08.250
KernelTime 00:00:10.796
Win32 Start Address 0x00007ff6d2f24270
Stack Init ffffd001cd16afd0 Current ffffd001cd16a730
Base ffffd001cd16b000 Limit ffffd001cd165000 Call 0
Priority 8 BasePriority 8 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
The image name is rundll32.exe, which is indeed not the image name associated with playing the media clip.
Note To set the current thread, type .thread <thread number>.
For more information about threads and processes, see the following references:
Threads and Processes
Changing Contexts
Section 11: IRQL, registers, and disassembly
View the saved IRQL
In Section 11, you will display the IRQL, and the contents of the regsisters.
<- On the host system
The interrupt request level (IRQL) is used to manage the priority of interrupt servicing. Each processor has an
IRQL setting that threads can raise or lower. Interrupts that occur at or below the processor's IRQL setting are
masked and will not interfere with the current operation. Interrupts that occur above the processor's IRQL
setting take precedence over the current operation. The !irql extension displays the interrupt request level
(IRQL) on the current processor of the target computer before the debugger break occurred. When the target
computer breaks into the debugger, the IRQL changes, but the IRQL that was effective just before the debugger
break is saved and is displayed by !irql.
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 2 (DISPATCH_LEVEL)
<
View the registers and disassembly
View the registers
Display the contents of the registers for the current thread on the current processor by using the r (Registers)
command.
0: kd> r
rax=000000000000c301 rbx=ffffe00173eed880 rcx=0000000000000001
rdx=000000d800000000 rsi=ffffe00173eed8e0 rdi=ffffe00173eed8f0
rip=fffff803bb757020 rsp=ffffd001f01f8988 rbp=ffffe00173f0b620
r8=000000000000003e r9=ffffe00167a4a000 r10=000000000000001e
r11=ffffd001f01f88f8 r12=0000000000000000 r13=ffffd001f01efdc0
r14=0000000000000001 r15=0000000000000000
iopl=0 nv up ei pl nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000202
nt!DbgBreakPointWithStatus:
fffff803`bb757020 cc int 3
Alternatively, you can display the contents of the registers by selecting View > Registers .
Viewing the contents of the registers can be helpful when stepping through assembly language code execution
and in other scenarios. For more information see r (Registers) .
For information about contents of the register, see x86 Architecture and x64 Architecture.
Disassembly
You can disassemble the code that is under execution to view the assembly language code that is being run by
selecting View > Disassembly .
For more information about assembly language disassembly, see Annotated x86 Disassembly and Annotated
x64 Disassembly.
Section 12: Work with memory
In Section 12, you will use debugger commands to display the contents of memory.
View memor y
You may need to examine memory to identify an issue or to inspect variables, pointers, and so on. You can
display memory by typing one of the following d* <address> commands.
Note If you attempt to display an invalid address, its contents are shown as question marks (?).
Alternatively, you can view the memory by selecting View > Memor y . Use the Display format pull down to
change how the memory is displayed.
1. To view data associated with the volume control, set a breakpoint to fire on the
PropertyHandlerAudioEngineVolumeLevel routine using the bm command. Before we set the new
breakpoint, we will clear all of the previous breakpoints using bc *.
kd> bc *
kd> bm tabletaudiosample!CMiniportWaveRT::SetDeviceChannelVolume
1: fffff80f`02c3a4b0 @!"tabletaudiosample!CMiniportWaveRT::SetDeviceChannelVolume"
Breakpoint 1 hit
tabletaudiosample!CMiniportWaveRT::SetDeviceChannelVolume:
fffff80f`02c3a4b0 44894c2420 mov dword ptr [rsp+20h],r9d
5. Use the View > Local menu item to display local variables. Note the current value of the IVolume
variable.
6. You can display the data type and the current value for the IVolume variable in the sample code by typing
the dt command and the name of the variable.
kd> dt lVolume
Local var @ 0xa011ea50 Type long
0n-6291456
PAGED_CODE ();
DPF_ENTER(("[CMiniportWaveRT::SetEndpointChannelVolume]"));
IF_TRUE_ACTION_JUMP(_ulNodeId != KSNODE_WAVE_AUDIO_ENGINE, ntStatus =
STATUS_INVALID_DEVICE_REQUEST, Exit);
8. Attempt to display the value at the memory location of IVolume by using the dt (Display Type)
command.
kd> dt dt lVolume
Local var @ 0xffffb780b7eee664 Type long
0n0
return ntStatus;
10. Display the value at the memory location of IVolume by using the dt (Display Type) command.
kd> dt lVolume
Local var @ 0xffffb780b7eee664 Type long
0n-6291456
Now that the variable is active, a value of 6291456 is displayed in this example.
11. You can also display the memory location of IVolume by using the ? (Evaluate Expression) command.
kd> ? lVolume
Evaluate expression: -79711507126684 = ffffb780`b7eee664
12. The address shown, ffffb780`b7eee664 is the address of the lVolume variable. Use the dd command to
display the contents of memory at that location.
kd> dd ffffb780`b7eee664
ffffb780`b7eee664 ffa00000 00000018 00000000 c52d7008
ffffb780`b7eee674 ffffc98e e0495756 fffff80e c52d7008
ffffb780`b7eee684 ffffc98e 00000000 fffff80e 00000000
ffffb780`b7eee694 ffffc98e ffa00000 ffffb780 b7eee710
ffffb780`b7eee6a4 ffffb780 00000000 00000000 c7477260
ffffb780`b7eee6b4 ffffc98e b7eee7a0 ffffb780 b7eee6f0
ffffb780`b7eee6c4 ffffb780 e04959ca fffff80e 00000000
ffffb780`b7eee6d4 00000000 00000028 00000000 00000002
13. You can display the first four bytes of an address by specifying the range parameter L4.
kd> dd ffffb780`b7eee664 l4
ffffb780`b7eee664 ffa00000 00000018 00000000 c52d7008
14. To see the different types of memory output displayed, type the du , da and db commands.
kd> du ffffb780`b7eee664
ffffb780`b7eee664 ""
kd> a ffffb780`b7eee664
ffffb780`b7eee664 ""
kd> db 0xffffae015ff97664
ffffae01`5ff97664 00 80 bc ff 18 00 00 00-00 00 00 00 08 50 e0 51 .............P.Q
ffffae01`5ff97674 00 c0 ff ff 56 57 da 56-0e f8 ff ff 08 50 e0 51 ....VW.V.....P.Q
ffffae01`5ff97684 00 c0 ff ff 00 00 00 00-0e f8 ff ff 00 00 00 00 ................
ffffae01`5ff97694 00 c0 ff ff aa 80 bc ff-01 ae ff ff 10 77 f9 5f .............w._
ffffae01`5ff976a4 01 ae ff ff 40 00 00 00-00 e6 ff ff 10 dc 30 55 [email protected]
ffffae01`5ff976b4 00 c0 ff ff a0 77 f9 5f-01 ae ff ff f0 76 f9 5f .....w._.....v._
ffffae01`5ff976c4 01 ae ff ff ca 59 da 56-0e f8 ff ff 00 00 00 00 .....Y.V........
ffffae01`5ff976d4 00 00 00 00 28 00 00 00-00 00 00 00 02 00 00 00 ....(...........
Use the df float option to display data as single-precision floating-point numbers (4 bytes).
df ffffb780`b7eee664
ffffb780`b7eee664 -1.#QNAN 3.3631163e-044 0 -2775.002
ffffb780`b7eee674 -1.#QNAN -5.8032637e+019 -1.#QNAN -2775.002
ffffb780`b7eee684 -1.#QNAN 0 -1.#QNAN 0
ffffb780`b7eee694 -1.#QNAN -1.#QNAN -1.#QNAN -2.8479408e-005
Write to memor y
Similar to the commands that are used for reading memory, you can use the e* commands to change memory
contents.
eb Byte values
kd> ? lVolume
Evaluate expression: -79711507126684 = ffffb780`b7eee664
2. Overwrite that memory address with new characters using the eb command.
kd> eb 0xffffb780`b7eee664 11 11 11 11 11
3. Display the memory location to confirm that the characters have been overwritten by typing the db
command.
kd> db 0xffffb780`b7eee664
ffffb780`b7eee664 11 11 11 11 11 00 00 00-00 00 00 00 08 70 2d c5 .............p-.
ffffb780`b7eee674 8e c9 ff ff 56 57 49 e0-0e f8 ff ff 08 70 2d c5 ....VWI......p-.
ffffb780`b7eee684 8e c9 ff ff 00 00 00 00-0e f8 ff ff 00 00 00 00 ................
ffffb780`b7eee694 8e c9 ff ff 00 00 a0 ff-80 b7 ff ff 10 e7 ee b7 ................
ffffb780`b7eee6a4 80 b7 ff ff 00 00 00 00-00 00 00 00 60 72 47 c7 ............`rG.
ffffb780`b7eee6b4 8e c9 ff ff a0 e7 ee b7-80 b7 ff ff f0 e6 ee b7 ................
ffffb780`b7eee6c4 80 b7 ff ff ca 59 49 e0-0e f8 ff ff 00 00 00 00 .....YI.........
ffffb780`b7eee6d4 00 00 00 00 28 00 00 00-00 00 00 00 02 00 00 00 ....(...........
Alternatively, you can modify the contents of the memory in a watch or locals window. For the watch window,
you may see variables that are out of context of the current frame. Modifying them is not relevant if they are not
in context.
0: kd> qd
For more information, see Ending a Debugging Session in WinDbg in the debugging reference documentation.
See Also
Getting Started with Windows Debugging
Debugging Using WinDbg Preview
6/16/2021 • 4 minutes to read • Edit Online
WinDbg Preview is the latest version of WinDbg with more modern visuals, faster windows, a full-fledged
scripting experience, built with the extensible debugger data model front and center. WinDbg Preview is using
the same underlying engine as WinDbg today, so all the commands, extensions, and workflows you're used to
will still work as they did before.
General features
Easier Connection Setup and Recall - The WinDbg Preview includes the ability to recall previous session
configuration information.
Easy feedback channel - Your feedback will guide the development effort going forward. For more
information, see Providing Feedback
Dump file processor detection -Auto-detects processor architecture for easier managed debugging.
Performance Improvements Windows now load asynchronously and can be canceled - When you run
another command, WinDbg Preview will stop the loading of your locals, watch, or other windows.
Windowing improvements
Disassembly Window Improvements - The disassembly window is also improved, the highlight of
the current instruction remains where it is when you scroll.
Memor y window improvements - The memory window has highlighting and improved scrolling.
Locals and watch data model visualization - The locals and watch windows are both based off of the
data model that is used by the dx command. This means the locals and watch windows will benefit from
any NatVis or JavaScript extensions you have loaded, and can even support full LINQ queries, just like the
dx command.
Logs - This is a under the covers log of the WinDbg Preview internals. It can be viewed for
troubleshooting or to monitor long running processes.
For more information, see WinDbg Preview - View menu.
Command window - Use the command window provides easy access to toggle DML and clear the
debugger command window. All current debugger commands are compatible with and continue to work in
WinDbg Preview.
Dark theme
Use File > Settings to enable the dark theme.
Source code
The source code window has been updated to be much more in line with modern editors.
Highlighting
The command window has two new highlighting features. Selecting any text will give a subtle highlight to any
other instances of that text. You can then hit "Highlight/Un-highlight" or Ctrl+Alt+H to persist the highlighting.
Better keyboard navigation
Just hit Ctrl+Tab and you can easily navigate between windows with just your keyboard.
Providing feedback
Your feedback will help guide WinDbg's development going forward.
If you have feedback such as a feature that you really want to see or a bug that makes something difficult,
use the Feedback Hub.
Team Blog
The debugger team blog, although now inactive, includes tips and tricks. /archive/blogs/windbg/
Videos
Watch these episodes of the Defrag Tools show to see Windbg Preview in action.
Defrag Tools #182 - Tim, Chad, and Andy go over the basics of WinDbg Preview and some of the features.
Defrag Tools #183 - Nick, Tim, and Chad use WinDbg Preview and go over a quick demo.
Defrag Tools #184 - Bill and Andrew walk through the scripting features in WinDbg Preview.
Defrag Tools #185 - James and Ivette provide and introduction to Time Travel Debugging.
Defrag Tools #186 - James and JCAB covers advanced Time Travel Debugging.
Next Steps
For information on what's new in the most recent release, see WinDbg Preview - What's New.
Review these topics to install and configure WinDbg Preview.
WinDbg Preview – Installation
WinDbg Preview – Command line startup options
WinDbg Preview – Settings and workspaces
WinDbg Preview – Keyboard shortcuts
These topics describe how to get connected to the environment that you want to debug.
WinDbg Preview – Start a user-mode session
WinDbg Preview – Start a kernel mode session
These topics describe some common tasks, organized by the menu tabs.
WinDbg Preview – File menu
WinDbg Preview – Home menu
WinDbg Preview – View menu
WinDbg Preview – Breakpoints
WinDbg Preview – Data model
WinDbg Preview – Scripting
WinDbg Preview - What's New
6/16/2021 • 21 minutes to read • Edit Online
This topic provides information on what's new in the WinDbg Preview debugger.
1.2104.13002.0
Smart number selection and search
A convenient productivity feature of WinDbgNext is the ability to detect patterns in the command window. To do
this, select any text, and all other instances of that text highlighted. Because this highlighting is useful when
looking at memory patterns, it now will also highlight equivalent numbers in other radixes, no matter how the
number is formatted in hex, decimal, or scientific notation. For more information about numbering schemes, see
n (Set Number Base)).
Example:
When selecting 0x000001e2fb3f6160 , all other instances are highlighted no matter the format.
This feature works with semi-temporary highlights as well. Ctrl + Double Click on a number to highlight all its
instances. You can keep track of multiple important numbers throughout your command history this way (to
clear the highlight, Ctrl + Double Click on the number again). Finally, this feature also works when searching
numbers with Ctrl + F.
Source Code Extended Access
The source path command (.srcpath, .lsrcpath (Set Source Path))[-srcpath---lsrcpath--set-source-path-.md] has
been updated to include a new tag – DebugInfoD. For more information, see Source Code Extended Access.
Host and guest states of WOW processes in the data model
When debugging a 32-bit WOW process from a 64-bit context, users can now access both the host and guest
states within the data model.
32 bit guest state examples:
dx @$curprocess.Environment
dx @$curthread.Environment
dx @$curthread.Stack
dx @$curthread.NativeEnvironment
dx @$curthread.NativeStack
1.0.2007.01003
Timeline Bookmarks
Bookmark important Time Travel positions in WinDbg instead of manually copy pasting the position to notepad.
Bookmarks make it easier to view at a glance different positions in the trace relative to other events, and to
annotate them.
You can provide a descriptive name for bookmarks.
Access Bookmarks via the Timeline window available in View > Timeline. When you hover over a bookmark, it
will display the bookmark name.
You can select and hold (or right-click) the bookmark to travel to that position, rename or delete the bookmark.
Modules Window
A new windows shows modules and their related information, it is available via the View ribbon. It displays:
The name of the module including the path location
The size in bytes of the loaded module
The base address that the module is loaded at
The file version
0:000> ~
0 Id: 53a0.5ffc Suspend: 1 Teb: 000000b1`db1ed000 Unfrozen "Hello world!"
7 Id: 53a0.9114 Suspend: 1 Teb: 000000b1`db1ef000 Unfrozen
8 Id: 53a0.2cc4 Suspend: 1 Teb: 000000b1`db1f1000 Unfrozen
9 Id: 53a0.5c40 Suspend: 1 Teb: 000000b1`db1f3000 Unfrozen
0:000> dx @$curthread
@$curthread : ConsoleTestApp!ILT+25(mainCRTStartup) (00007ff7`fac7101e) [Switch To]
Id : 0x5ffc
Name : Hello world!
Stack
Registers
Environment
1.0.1912.11001
TTD Timelines - We've added a new window that displays a visual representation of important events in your
trace: exceptions, breakpoints, function calls, and memory accesses. Timelines will automatically open and
display exceptions (if present) and breakpoints. For more information, see WinDbg Preview - Timeline.
Switched to default window chrome - The custom window chrome we were using, while prettier, was
causing some scaling and resizing issues for a notable number of people, so we’ve opted to remove it for the
time being.
File menu improved keyboard navigation - The file menu is now much easier to navigate with just a
keyboard.
Other changes and bug fixes
The stack and locals window will now be disabled when your target is running and won’t show “Unspecified
error” when there is no target.
Added a “Services” column to the attach dialog to easily find which services are running.
Fixed a bug that caused architecture detection to not work when launching applications with arguments.
The disassembly window has improved disassembly when private symbols are loaded.
jsprovider.dll is now loaded automatically, so we removed the “Load JSProvider” button from the scripting
ribbon.
1.0.1908.30002
Improvements to TTD Calls objects - Calls queries now include parameter names, types, and values. When
querying across traces for function calls you can get fully typed parameters and their values making it easy to
filter down results by parameters.
Suppor t for Open Enclave - WinDbg Preview can now debug Open Enclave (OE) applications for more
information, see Open Enclave debugging).
VS Code Extension - To make it easier to develop for Open Enclave, we’ve released a basic VS Code extension
to enable a quicker inner loop. Variables, Watch, and Call Stack windows all work as well as breakpoints and
source windows, any deeper debugging will need to use the console window.
You can find the extension in the VS Code Marketplace and report any issues to our WinDbg Feedback GitHub.
Note that while the extension may work for other scenarios, we’re only intending on fixing issues related to OE
scenarios at this point.
ELF Core Dumps - As part of supporting Open Enclave, WinDbg can open ELF core dumps and binaries as well
as DWARF symbols (DWARF 5 is not currently supported) from both Enclaves and Linux applications. When
opening a core dump from a non-Windows application, basic windows and commands should all work properly,
but most extensions and Windows-specific commands will not work. ELF and DWARF files will be downloaded
from symbol servers following the key conventions defined here. Enclaves are the only supported scenario, but
we’re open to feedback on opening other Linux core dumps.
TTD File format change - We’ve made a major update to the file format for TTD traces that breaks forward
compatibility. Previous versions of WinDbg Preview will not be able to open traces recorded with this (and
future) versions of WinDbg Preview, but this (and future) versions will be able to open both new and old traces.
Other changes
TTD will now use the 64-bit engine for indexing and the appropriate debugger engine bitness for replays to
minimize potential memory issues when indexing and SOS issues when replaying.
Running 'dx' without any parameters will now show the root namespace for easier browsability.
You can now modify the default symbol and source cache location via the settings menu.
Improved support for recording AVX-512 (recording of AVX-512 will cause a larger than normal slow-down).
We've enabled offline licensing.
1.0.1905.12001
Improvements to SymSetDiaSession error mitigation - Our fix last month to mitigate the error caused by
applications injecting DbgHelp into our process was still not working in some scenarios. We've made
improvements to it and will continue to monitor feedback on this error.
Accent color customization - A lot of scenarios need several instances of WinDbg open, and moving back
and forth between them can be confusing and take some time to figure out which one is the “right” one. We’ve
added the ability to change the blue accent color to help visually distinguish sessions and make swapping
between them easier.
Just select the View ribbon and select an option for Accent color in the last section. When future sessions are
launched from recent targets, the accent color will be persisted as part of the target’s workspace.
Source tokenization improvements - The source window now has basic support for tokenizing Rust source
files and C++ SEH __try/__except/__finally/__leave.
Coroutine improvements - Improved support for coroutine local variables and certain optimized variables.
Default symbol and source cache setting - Added an option to the settings menu under Debugging
settings to change the cache location for symbols. Note - There’s a known issue that making this blank will
cause source loading to fail. We’ll be adding validation to prevent this from happening in a future release.
-pv fixes - Fixed a bug that may have prevented -pv (non-invasive attach) from working in some circumstances.
1.0.1904.18001
Fix for SymSetDiaSession error - We've had reports for a while of an error that prevents WinDbg Preview
from being launched in some situations. There are a few external applications that attempt to inject a version of
DbgHelp into our process before we load it. Some of them are using a version of DbgHelp with missing
functionality, which causes this error when we attempt to use those features. We've added a fix for this and will
be tracking if there are still scenarios in which it occurs.
Font control - We've added settings for controlling font and font size. There are two different settings, one for
text windows (mono-spaced windows like disassembly, source, command, etc.) and one for tool windows (locals,
stack, etc.). There's still a few areas that aren't affected by these options that we'll be updating in the future.
Highlighting improvements - Persistent highlighting of text in the command window will now also highlight
text in the source and notes windows.
Source loading improvements - We've changed how loading source files works. Previously when opening a
source file, engine operations like running additional commands weren't possible or were unpredictable. We've
changed where the loading occurs to enable better parallelism and more reliable cancellation of source opening
operations.
Other changes and bug fixes:
Added "Go to disassembly" to the context menu of the source window.
Added a checkbox to "Follow current instruction" in disassembly window.
Fixed a bug that caused the command window to perform slowly when outputting lots of text.
Changed page up and page down keys to perform similar to Visual Studio.
When an ASM file is opened in the source window it will now have basic comment, string, and directive
highlighting
1.0.1812.12001
This version includes these updates.
Debugger data model C++ header - There is a new C++ header, DbgModel.h, included as part of the
Windows SDK for extending the debugger data model via C++. You can find more information in Debugger
Data Model C++ Overview. This release includes a new extension that adds some more "API style" features to
the debugger data model that can be accessed through the 'dx' command, JavaScript, and the new DbgModel.h
header. This extension extensions the data model to include knowledge about assembly and code execution
through the Debugger.Utility.Code namespace, and the local file system through the Debugger.Utility.FileSystem
namespace.
Synthetic types extension With this new API extension, we have a new sample up on our GitHub repo here -
https://github.com/Microsoft/WinDbg-Samples/tree/master/SyntheticTypes. This JavaScript extension reads
basic C header files and defines synthetic type information for the structures and unions defined in the header.
Through the dx command, memory can then be viewed structured as if you had a PDB with type information for
those types.
Other changes and bug fixes:
WinDbg Preview will now more intelligently handle bringing source windows or the disassembly window to
the foreground when stepping.
Re-arranged WinDbgNext's window title to have more important information at the start when kernel
debugging.
The alternating background contrast in the command window should be slightly more noticeable.
1.0.1810.2001
This version includes these updates.
New Settings dialog that is accessed from the File menu or the Home ribbon.
Events and exceptions settings dialog. This menu changes how the debugger handles events and exceptions,
the equivalent of the 'sx' commands or WinDbg's event filters dialog. Select Settings on the home ribbon,
then hit "Events and Exceptions" on the left to manage those.
Improved TTD indexer with better performance. This increases the performance of indexing TTD trace files,
making the indexing process much faster (between 2x-10x) while making index files much smaller (~50%
smaller). The perf improvements are most noticeable for traces over 4GB in size, or when using a machine
with many CPU cores (8+). The new indexer makes it more feasible to debug very large traces (50GB+).
New debugArch launch flag for specifying architecture. WinDbg Preview attempts to launch the debugger
engine with the correct bitness to the target to better support debugging managed code. There are
circumstances where it can't determine the right bitness or you may want to override what it decides. Use -
debugArch x86|amd64 to control the architecture of debugger engine.
Other changes and bug fixes:
Fixed a bug that would cause black bars to appear on a full screen debugger with a floating window open.
Fixed a bug that would cause symbol options to be cleared unintentionally.
Command history is now preserved when launching from recent targets.
In the data model window, you can now edit values.
Un-indexed TTD traces will now be more clear that they're un-indexed.
Improved performance of the locals window
Added a ribbon button to save the command window logs to a file.
Added . SelectMany() to the default set of LINQ methods.
1.0.1807.11002
This version includes these updates.
Automatic saving and loading of breakpoints . This is a first step to replace workspaces. We’re starting
down that route by enabling the saving and loading of breakpoints. Launching something you’ve debugged
previously from the “Recents” tab in the file menu will now load the breakpoints from that session. The plan is to
expand this functionality to preserve more information across sessions. Hardware breakpoints (ba) and other
various properties on breakpoints like thread and process specific contexts as well as conditions are not
currently being saved.
Minor changes and bug fixes:
Added command-line options -x, -xe, -xd, -xn, and -xi for controlling the handling of exceptions and events.
These command-line options behave just like their command counter-parts.
The notes window now supports bold, underline, and italics formatting.
Fixed some zoom and scrolling issues.
Selecting text in the command, memory, sources, or disassembly windows will now show a light highlight
over other instances of the selected text.
Fixed a bug where interrupting symbol loading would cause symbol loading to fail for the rest of the session.
NatVis will now reload properly on restarting a session.
1.0.1805.17002
This version includes these updates.
New disassembly window - The disassembly window now includes:
Scrolling up or down will continuously load more disassembly whenever possible.
Syntax highlighting for numbers, code addresses, and opcodes.
Selecting a code symbol will jump the disassembly window to that location.
Hovering over numbers will show a tooltip that converts that number to other bases.
Headers signifying the start of a function.
Faster source window - The source window has been updated to be faster and more resource efficient.
Minor changes and bug fixes:
Fixed issues around symbol caching
Fixed some cases where toggle initial break wasn’t usable when the target isn't broken in
If you hit tab in the command window with nothing available, the cursor will now stay in the input field
WinDbgNext will now auto-detect bitness when opening CAB files
1.0.1804.18003
This version includes these updates.
Symbol status and cancellation improvements - There are time where the debugger display BUSY loading
symbols and it’s difficult to determine what it’s doing and why without !sym noisy enabled. We’ve updated
WinDbg Preview to have some better communication around what it’s doing when loading symbols to help
troubleshoot any issues. In addition to easily seeing exactly what’s happening, we’ve made some changes that
should make cancelling symbols more reliable and the Logs window will contain some of the details that’s
normally output when !sym noisy is enabled. If you hit View -> Logs you’ll get the full noisy symbol loading
output without having to turn it on and attempt to reload the symbols.
Experimental notes window - WinDbg Preview now has a window for taking notes. Just hit View -> “Notes”
to open it. If you copy/paste into it, DML links will be preserved and still work as if it was the command window.
You can also save and load notes files from the “Notes” ribbon when the window is open.
Experimental faster source window - To help improve the performance of WinDbg Preview there us a
experimental new source window that is quite a bit more efficient. There’s still a few gaps around context menus
and syntax highlighting, but we want to give everyone the option of trying it out before it’s finished to give us
early feedback. Run $UseFastSourceWindow to use it. If you want to go back to the old one, run
$UseMonacoSourceWindow. The setting will preserve across sessions, you will need to close and re-open
source windows to get the new version.
JSProvider API version 1.2 - For JavaScript extensions that declare support for API version 1.2:
Any object with a .compareTo method which exits the script will have a custom comparator on it (comparison
operators will work in the DX evaluator and elsewhere: e.g.: IModelObject::Compare)
Any object with a .equals method which exits the script will have a custom equality operator on it (== and !=
will work in the DX evaluator and elsewhere: e.g.: IModelObject::IsEqualTo)
Native or data model objects which enter the script will have .compareTo and .equals on them which allow
access to any custom comparator or custom equality implementations.
Minor changes and bug fixes:
.server will now list fully qualified domain name for easier use when there’s domain issues around short
names.
Ctrl+G now works in the source window.
Added address bar to the disassembly window.
WinDbg Preview will now handle _NT_SYMBOL_PATH in a more expected way.
Added -server command-line option.
TTD data model queries can now be displayed progressively, so if you interrupt it you’ll still see some results.
This feature is still experimental and optional. Run dx @$cursession.TTD.AsyncQueryEnabled = 1 to enable it.
The ‘dps’ command now has links to the source files it refers to.
1.1801.19001.0
This version includes these updates.
Text Highlighting - You can now highlight all instances of selected text directly in the debugger. To use this
feature, just select some text in the command window and then select “Highlight” in the command ribbon or hit
CTRL+ALT+H. Using one of those on already highlighted text will remove the highlighting.
If you prefer using commands, you can use the “$hl” command:
$hl ["someValueHere"] - Highlight give text (or un-highlight if already highlighted)
$hl clearAll – Clear all highlighted entries
$hl caseSensitive [1|0] - Set highlight matching to case sensitive or case insensitive (default is case
insensitive)
This release also includes some minor bug fixes.
1.1712.15003.0
This version includes these updates.
TTD memor y queries - You can now query TTD for memory accesses similar to how you query for calls today.
This allows you to find all of the reads, writes and execution which access a specific range of memory.
Read and write example: dx @$cursession.TTD.Memory(startAddress, endAddress, "rw")
1.0.14.0
This version includes these updates.
Improved process ser ver experience - A new notification in the File menu to show what process server
you’re connected to and interacting with has been added. As part of these changes, when ending a debugging
session, the process server connection will persist and can be disconnected in the File menu.
New pre-set layout options in the View ribbon - There is a new “Layouts” option in the “View” ribbon.
There are currently three layouts: the default, one focused on disassembly, and one minimal.
Time Travel Debugging ribbon - There is an enhanced Time Travel ribbon that will show up when debugging
a time travel debugging trace.
Metadata from JavaScript scripts - JavaScript extensions can now return metadata for properties and other
constructs. This means that the extension can provide help strings, indicate the display radix for values, and
more. Metadata is provided by placing a metadata descriptor on an object via either presence of
Symbol.metadataDescriptor or an explicit call to host.metadata.defineMetadata. Function returns, iterated values,
and other value contexts can return metadata for their value via host.metadata.valueWithMetadata.
JavaScript API updates - Some potentially source level breaking changes were made to the APIs within the
JavaScript provider (including new projected methods and properties on native objects). Existing extensions will
not see any of the potentially breaking changes without indicating that they support a new version of the
JsProvider API. Support for the new API version is indicated by placing a host.apiVersionSupport record in the
array returned by initializeScript with a claim of supporting version 1.1. maybe? .. with a value indicating
support for version 1.1.
Changes in API version 1.1 include:
host.getModuleSymbol and host.getModuleType return null if they cannot find the symbol instead of
throwing an exception.
All native objects have the address property on them in addition to .targetLocation. If the object does not
have an address, an exception will be thrown when accessing the property.
All native objects have new .getObjectValue and .setObjectValue methods on them to access properties on
the object which may conflict with names JavaScript places on the object (e.g.: ‘address’) .
Additional JavaScript changes
JavaScript extensions can now add and remove properties on data model objects via Object.defineProperty
and the delete operator. Adding or registering a JavaScript class as a parent model or type signature is still
the strongly preferred way of manipulating the object model.
JavaScript extensions can now modify global variables within modules in the debug target through a new
host.setModuleSymbol API.
All of the math functions which are on the 64-bit library type (e.g.: .add, .subtract, .multiply, .divide, etc…) are
now present on JavaScript numbers as well.
JavaScript functions and properties can now return values which are enums through custom marshaling. A
function or property accessor can return host.typeSystem.marshalAs(value, type…) in order to evoke such
custom marshaling.
The breakpoint command in the script debugger can now break on function names in addition to
line/column positions.
Type objects in JavaScript extensions have access to their containing module through the .containingModule
property.
Minor changes and bug fixes:
Fixed formatting of conditional ribbon tabs to be less confusing.
Re-worked DML to be stricter in parsing to improve performance.
Various fixes with the performance and behavior of CTRL+F.
Added a warning when running un-elevated prior to trying to use TTD.
Added the option to override automatic target bitness detection.
Disabled various file menu and ribbon options when they can’t be used (like “Go” when in a dump file).
Known issues:
SOS will not work on x86 traces.
1.0.13.0
This version adds Time Travel Tracing. Time Travel Debugging, allows you to record a process, then replay it later
both forwards and backwards. Time Travel Debugging (TTD) can help you debug issues easier by letting you
"rewind" your debugger session, instead of having to reproduce the issue until you find the bug. For more
information, see Time Travel Debugging - Overview.
1.0.12.0
This version was the first release of WinDbg Preview. For general information on the features available in
WinDbg Preview, Debugging Using WinDbg Preview.
See Also
WinDbg Preview – Installation
WinDbg Preview – Command line startup options
WinDbg Preview - Installation
6/16/2021 • 2 minutes to read • Edit Online
Installation
Debugger coexistence
The WinDbg preview coexists with the classic WinDbg debugger on the same machine, so you can work with
both versions at the same time.
See Also
Debugging Using WinDbg Preview
WinDbg Preview – Command line startup options
WinDbg Preview - Command line startup options
6/16/2021 • 4 minutes to read • Edit Online
O P T IO N DESC RIP T IO N
-logo LogFile Log Open. Begins logging information to a log file. If the file
exists, it will be overwritten.
-loga LogFile Log Append. Begins logging information to a log file. If the
file exists, it will be appended to.
-e EventHandle Signals the event with the given handle after the next
exception in a target.
Kernel Options
O P T IO N DESC RIP T IO N
O P T IO N DESC RIP T IO N
Target Options
O P T IO N DESC RIP T IO N
-premote SmartClientTransport Creates a smart client, and connects to a process server that
is already running. For an explanation of the possible
SmartClientTransport values, see Activating a Smart Client.
-psn ServiceName Specifies the name of the service contained in the process to
be debugged. This is used to debug a process that is already
running.
O P T IO N DESC RIP T IO N
-z DumpFile Specifies the name of a crash dump file to debug. If the path
and file name contain spaces, this must be surrounded by
quotation marks.
-debugArch x86 -or- amd64 Override the autodetect behavior and set the target bitness
for the debugger.
-openPrivateDumpByHandle Handle Microsoft internal use only. Specifies the handle of a crash
dump file to debug.
Symbol Options
O P T IO N DESC RIP T IO N
-sup Causes the symbol handler to search the public symbol table
during every symbol search
O P T IO N DESC RIP T IO N
If you are in a local debugger session, srcpath and lsrcpath are effectively the same (your “server” is your local
session). For remote debugging there are situtations where you may want to set these to different values. For
more information about remote debugging see, Remote Debugging.
Exception handling
O P T IO N DESC RIP T IO N
-xn Exception For the given exception, disable first- and second-chance-
handling, and only display a message on the console.
-xi Exception Completely ignore the given exception, disabling first- and
second-chance handling, and not outputing anything to the
console.
For a list of exceptions that can be specified, see Event Definitions and Defaults.
Post Mor tem
O P T IO N DESC RIP T IO N
Deprecated Options
O P T IO N DESC RIP T IO N
For general information on the startup parameters, see WinDbg Command-Line Options.
You can use -? to list the supported command line options.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Settings and workspaces
6/16/2021 • 3 minutes to read • Edit Online
This section describes how to setup and configure the WinDbg Preview debugger.
Settings
Use the settings menu to set things such as the source and symbol path as well as choose the light and dark
theme for the debugger.
Workspaces
Workspaces allows you to save configuration information in the target connection information file.
The options in workspaces are saved upon closing the debugger or can be manually saved using File -> Save
Workspace.
Workspaces are automatically loaded when launching from the recent targets list or they can be manually
loaded in the file menu.
In addition to the target connection information, the following settings are stored in the workspaces file.
General Settings
NOTE
This list and format isn't final and is subject to change.
For more information about the command line options, see WinDbg Command-Line Options.
Symbol Settings
Note that this file format continues to evolve as more features are added to the WinDbg Preview debugger.
See Also
Debugging Using WinDbg Preview
WinDbg Preview keyboard shortcuts
6/16/2021 • 2 minutes to read • Edit Online
This section summarizes the keyboard shortcuts for the WinDbg preview debugger.
All of the ribbon menu options are available using the Alt + the first letter of the option. For example Alt + H to
go to the home menu, Alt + H + S to stop debugging.
Flow control
K EY ST RO K E DESC RIP T IO N
F5 Continue
F7 Run to line
Ctrl+Shift+F5 Restart
Alt+H,D Detach
Setup
K EY ST RO K E DESC RIP T IO N
F6 Attach to process
Breakpoints
K EY ST RO K E DESC RIP T IO N
Windowing
K EY ST RO K E DESC RIP T IO N
Scripting
K EY ST RO K E DESC RIP T IO N
Stack navigation
K EY ST RO K E DESC RIP T IO N
Help
K EY ST RO K E DESC RIP T IO N
Misc.
K EY ST RO K E DESC RIP T IO N
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Start a user mode session
6/16/2021 • 2 minutes to read • Edit Online
This section describes how to start a user mode session with the WinDbg preview debugger.
Select File, Start debugging, and select either of these four options:
Launch Executable - Starts an executable and attaches to it by browsing for the target.
Launch Executable (advanced) - Starts an executable and attaches to it using a set of dialog boxes with
advanced options.
Attach to a process - Attaches to an existing process.
Launch App Package - Launches and attaches to an app package.
All four options are described here.
Launch Executable
Use this option to starts an executable and attach to it.
Browse to the desired executable in the provided file dialog and open it.
NOTE
Items with a UAC shield will need the debugger to be elevated to attach.
Use the pull down dialog on the Attach button to select non-invasive attach.
This topic describes how to start a kernel mode session with WinDbg Preview.
The process is very similar to how it has been done with previous versions of WinDbg. Select the tab for the
type of transport you're using, fill in the required fields, and click OK.
NOTE
Local kernel debugging requires WinDbg Preview to be launched elevated.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Start a remote, process server
and dump file session
6/16/2021 • 2 minutes to read • Edit Online
This section describes how to start a remote, process server and dump file session with the WinDbg preview
debugger.
Remote debugging involves two debuggers running at two different locations. The debugger that performs the
debugging is called the debugging server. The second debugger, called the debugging client, controls the
debugging session from a remote location. To establish a remote session, you must set up the debugging server
first and then connect to it with the the debugging client.
For more information about remote sessions, see Remote Debugging Using WinDbg.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - File Menu
6/16/2021 • 2 minutes to read • Edit Online
C:\Users\*UserName*\AppData\Local\DBG\targets
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Home Menu
6/16/2021 • 2 minutes to read • Edit Online
Flow Control
Use the Flow Control buttons to break into a connected debugging target, resume code execution on the target
and step in to and out of code.
End
Use the End buttons to restart, detach and stop debugging.
Preferences
Use Preferences buttons to toggle between source code and assembly views and to access the Settings menu.
Help (Support)
Use Help buttons to do the following:
Review Local Help - Offline
Online Help - Most up to date
Feedback Hub
Send Feedback (For more information on sending feedback to improve WinDbg, see Providing feedback.)
See Also
Debugging Using WinDbg Preview
WinDbg Preview - View Menu
6/16/2021 • 2 minutes to read • Edit Online
This section describes how work with the view menu in WinDbg Preview.
The view menu will open a new Window for each item, or bring focus to the existing Window, if one is already
open.
Command
The command Window allows you to enter debugger commands. For more information about debugger
commands, see Debugger Commands.
Watch
The watch Window allows you to watch local variables and registers.
The locals and watch windows are both based off of the data model that is used by the dx command. This means
the locals and watch windows will benefit from any NatVis or JavaScript extensions you have loaded, and
support full LINQ queries, just like the dx command. For more information about the data model, see WinDbg
Preview - Data Model.
Locals
The locals window displays information about all of the local variables in the current scope. The locals window
will highlight values that have changed during the previous code execution.
Registers
Registers displays the contents of the processors registers when they are available. For more information about
registers, see Registers and Viewing and Editing Registers in WinDbg.
Memory
Use the memory window to display memory locations. In addition to providing a memory address, you can use
the Pseudo-Register values such as $scopeip and $eventip to examine memory. Pre-append the @ symbol to
use the pseudo-register values in the memory window, for example, @$scopeip . For more information, see
Pseudo-Register Syntax
Stack
Use the stack Window to view the current call stack. The stack window provides basic highlighting of the current
frame.
Disassembly
The disassembly window highlights the current instruction and retains that position when you scroll.
Threads
The threads window highlights the current thread.
Breakpoints
Use the breakpoints window to view, enable and clear breakpoints.
Logs
This log is of the WinDbg Preview internals. It can be viewed to monitor long running processes and for
troubleshooting the debugger itself.
You can continue to create a traditional debugger command log, using the .logopen command. For more
information on that, see Keeping a Log File in WinDbg.
Notes
Use the Notes option to open a note taking window.
Timelines
Use Timelines to open or bring focus to the timelines window. For more information on timelines, see WinDbg
Preview - Timelines.
Modules
Use modules to display loaded modules and their related information. Modules displays the following:
The name of the module including the path location
The size in bytes of the loaded module
The base address that the module is loaded at
The file version
Layouts
Use the Layouts pull down menu to select from three window layouts.
Reset Windows
Use this function to reset the debugger windows to their default positions.
Accent Color
Use the pull down menu to set the accent color for the debugger.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Breakpoints Menu
6/16/2021 • 2 minutes to read • Edit Online
This section describes how to work with breakpoints using the WinDbg preview debugger.
Breakpoints Menu
Use the breakpoints menu to create new and remove existing breakpoints as well as toggle the initial breakpoint
(initial breakpoint is currently kernel only).
Breakpoints Window
Use the breakpoints window, opened via the View menu, to view, set and clear breakpoints. You can also double-
click a breakpoint to open its source file.
The breakpoint window keep a running total of each time the breakpoint is hit.
The general process of working with breakpoints is similar to previous versions of WinDbg. For more
information about setting breakpoints, see Setting Breakpoints in WinDbg.
WinDbg Preview - Time Travel Menu
6/16/2021 • 2 minutes to read • Edit Online
This section describes how work with the time travel menu in WinDbg Preview.
For more information about time travel see Time Travel Debugging - Overview.
Trace
Index Trace
Use the Index Trace option to force a re-index of a time travel trace.
Events
Use the Events pull down to display either Exceptions or Module load events.
Position
Time travel to start
Use Time travel to start to move to the start of a time travel trace file.
Time travel to end
Use Time travel to start to move to the end of a time travel trace file.
Misc
Information
Use Information to display information about the trace, such as size and number of threads.
Timelines
Use the to Timelines option to access debugger timelines. For more information see WinDbg Preview Timelines.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Data Model Menu
6/16/2021 • 2 minutes to read • Edit Online
This section describes how to work with the data model menu in the WinDbg Preview debugger.
For general information about the debugger objects refer to dx (Display Debugger Object Model Expression).
Use LINQ queries to dig deeper into the session. This query shows the top 5 processes running the most
threads.
When you click on any underlined item a new tab is opened and a query is run to display that information.
This query shows the devices in the plug and play device tree grouped by the name of the physical device
object's driver for a kernel session.
See Also
dx (Display Debugger Object Model Expression)
Debugging Using WinDbg Preview
WinDbg Preview - Scripting Menu
6/16/2021 • 2 minutes to read • Edit Online
This section describes how to use the scripting support in the WinDbg Preview.
The WinDbg Preview script window features basic syntax highlighting, IntelliSense, and error recognition.
Use the ribbon buttons to:
Create a new script
Open an existing script
Execute a script
Save a script
Unlink a script
You can also automatically execute scripts by right-clicking in the script window and selecting Execute Script on
Save. When you successfully load a script, a green check box will appear on the script title bar. If there are errors
in the script, a red x will be displayed.
JavaScript Scripting
To start using JavaScript, you must first be debugging a target. When you're ready to start working on your
JavaScript, click "Load JavaScript Provider". After that you can create a new JavaScript, by picking between these
two types of script templates.
Extension Script - A script which is designed to act as an extension to the debugger. It manipulates the
object model of the debugger and provides continued functionality. No action happens upon hitting the
Execute button on the ribbon.
Imperative Script - A script which is designed to perform an action each and every time the Execute
button is clicked on the ribbon. Such a script does not generally modify the object model of the debugger.
For more information about working with JavaScript, see these topics:
JavaScript Debugger Scripting
Native Debugger Objects in JavaScript Extensions
JavaScript Debugger Example Scripts
NatVis Scripting
Use New Script > NatVis to open the following blank NatVis template.
<AutoVisualizer xmlns="https://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="">
</Type>
</AutoVisualizer>
For more information about working with NatVis, see Debugger Objects in NatVis.
See Also
Debugging Using WinDbg Preview
WinDbg Preview - Notes, Command, Memory and
Source Menus
1/17/2020 • 2 minutes to read • Edit Online
This section describes how work with the Notes, Command, Memory and Source menus in WinDbg Preview.
Notes
Use the menu to:
Open a notes file
Save a notes file
Command
Use the command menu to:
Prefer DML
Highlight and Un-highlight the current text selection (CTRL+ALT+H)
Clear the command window text
Save window text to a dml file
Memory
Use the memory menu to:
Set a data model memory query
Set the memory size, for example to byte or long
Set the display format, for example hex or signed
Set the text display format, for example to ASCII
Source
Use the source menu to:
Open a source file
Set an instruction pointer
Run to cursor
Close all source windows
See Also
Debugging Using WinDbg Preview
WinDbg Preview Basics
6/16/2021 • 2 minutes to read • Edit Online
T IT L E DESC RIP T IO N
Using LINQ With the debugger objects SQL like query language
WinDbg Preview - Data model How to use the built in data model support in WinDbg
Preview
JavaScript Debugger Scripting How to use JavaScript to create scripts that understand
debugger objects
https://github.com/Microsoft/WinDbg-Samples The debugger team GitHub site where they share the latest
JavaScript (and C++) sample code.
Native Debugger Objects in JavaScript Extensions Describes how to work with common objects and provides
reference information on their attributes and behaviors.
TTD Basics
T IT L E DESC RIP T IO N
Time Travel Debugging - Sample App Walkthrough To give time travel a try checkout this tutorial
TTD queries
T IT L E DESC RIP T IO N
Introduction to Time Travel Debugging objects. You can use the data model to query time travel traces.
Videos
Watch these episodes of Defrag Tools to see Windbg Preview in action.
T IT L E DESC RIP T IO N
Defrag Tools #182 Tim, Chad, and Andy go over the basics of WinDbg Preview
and some of the features
Defrag Tools #183 Nick, Tim, and Chad use WinDbg Preview and go over a
quick demo
Defrag Tools #184 Bill and Andrew walk through the scripting features in
WinDbg Preview
Defrag Tools #185 James and Ivette provide and introduction to Time Travel
Debugging
Defrag Tools #186 James and JCAB covers advanced Time Travel Debugging
A P P RO A C H P RO S C ONS
Live debugging Interactive experience, sees flow of Disrupts the user experience, may
execution, can change target state, require effort to reproduce the issue
familiar tool in familiar setting. repeatedly, may impact security, not
always an option on production
systems. With repro difficult to work
back from point of failure to determine
cause.
Telemetry & logs Lightweight, often tied to business Issues arise in unexpected code paths
scenarios / user actions, machine (with no telemetry). Lack of data
learning friendly. depth, statically compiled into the
code.
Time Travel Debugging (TTD) Great at complex bugs, no coding Large overhead at record time. May
upfront, offline repeatable debugging, collect more data that is needed. Data
analysis friendly, captures everything. files can become large.
TTD Availability
TTD is available on Windows 10 after installing the WinDbg Preview app from the Store. WinDbg Preview is an
improved version of WinDbg with more modern visuals, faster windows, a full-fledged scripting experience,
with built in support for the extensible debugger data model. For more information on downloading WinDbg
Preview from the store, see Debugging Using WinDbg Preview.
Video Training
To learn more about TTD see these videos.
Defrag Tools 185 - Ivette and JamesP go over the basics of TTD and demo some features in WinDbg Preview
Defrag Tools 186 - Jordi and JCAB demo more great features of TTD in WinDbg Preview
CppCon (YouTube) - Jordi, Ken and JamesM presented TTD in WinDbg Preview at CppCon 2017