Setting Up Kernel-Mode Debugging over a USB 2.0 Cable in Visual Studio
Debugging Tools for Windows supports kernel debugging over a Universal Serial Bus (USB) 2.0 debug cable. The computer that runs the debugger is called the host computer, and the computer that is being debugged is called the target computer. The host computer must be running Windows 2000 or later, and the target computer must be running Windows Vista or later. USB debugging does not work over a hub or docking station.
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 by doing an Internet search for "USB 2.0 debug cable".
The host computer must have a USB 2.0 controller that is compatible with the Enhanced Host Controller Interface (EHCI) specification.
The target computer must have a USB 2.0 controller that is compatible with the EHCI specification, and that supports kernel debugging. Not all EHCI-compatible controllers have this support.
On the target computer, go to Control Panel > Network and Internet > Network and Sharing Center > Change advanced sharing settings. Under Guest or Public, select Turn on network discovery and Turn on file and printer sharing.
You can finish the configuration from the host computer:
- Establish a network connection between the host and target computers.
- On the host computer, in Microsoft Visual Studio, on the Driver menu, choose Test > Configure Computers.
- Click Add new computer. The Computer Configuration dialog box opens.
- For Computer name, enter the name of the target computer.
You have the following three configuration options as shown here.
Select either the second or third option. The second option configures the target computer for automatic driver deployment, automatic driver testing, and debugging. Configuring the target computer for automatic deployment and testing is called provisioning the target computer. For more information, see Configuring a Computer for Testing and Debugging. The third option configures the target computer for debugging but does not provision the target computer.
For Connection Type, choose USB.
For Target Name, enter a name to represent the debugging connection. This name does not have to be the same as the target computer name.
- The configuration process takes several minutes and might automatically reboot the target computer once or twice. When the process is complete, click Finish.
Note As an alternative to configuring the target computer from Visual Studio on the host computer, you can configure the target computer manually, as described in Setting Up a USB 2.0 Connection Manually.
- Connect a USB 2.0 debug cable to the USB 2.0 ports that you have chosen for debugging on the host and target computers.
- On the host computer, in Visual Studio, on the Tools menu, choose Attach to Process.
- For Transport, choose Windows Kernel Mode Debugger.
- For Qualifier, select the target name that you entered during configuration.
- Click Attach.
Build date: 11/16/2013