OSRLogoOSRLogoOSRLogo x Seminar Ad

Everything Windows Driver Development

GoToHomePage xLoginx

    Thu, 14 Mar 2019     118020 members


  Online Dump Analyzer
OSR Dev Blog
The NT Insider
The Basics
File Systems
ListServer / Forum
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

USB 2.0 Debugging

Most people don't realize it, but debugging over USB 2.0 has been supported for a while. When you read the details, however, you might have second thoughts as to whether you think it's worth the bother.

Support for debugging a target system via USB 2.0 is natively in Windows versions starting with Vista.

To make USB-based debugging work, you need a special cable that's referred to as a "USB debugger cable" -- The only one that folks here at OSR have seen is the PLX Net20DC. You can google for the part number, but somebody here found them for sale at www.semiconductorstore.com (search for Net20DC in the store, click "order online" to see the price) for $89 each (YIKES!).

Enable USB debugging on the target with the following BCDEdit commands:

bcdedit -debug on
bcdedit -dbgsettings usb targetname:

You must plug the USB debugger cable into PORT 1 of the root hub on the target machine. Which USB port on your target machine is port 1 of the root hub?  You mean you don't know??  Well, you might want to use the USBVIEW utility from the DDK to help you figure out which port is port 1.

On the host machine, you start by plugging BOTH ends of the cable into USB 2.0 ports on the host machine to get the driver loaded. Then unplug one end and plug it into Port 1 of the root hub on the target (as mentioned above).

But wait... there's more to consider!  For USB debugging to work, not only do you need to find physical Port 1 of your root hub,but also (a) your EHCI (USB 2.0) host controller has to include debugging support, and (b) The BIOS has to make that support available.  Though I have heard of people getting debugging to work over USB 2.0, I've never seen it myself.  And I've known many, many, many people who have tried to get it to work but were unsuccessful (after spending hours on the task). Just something to consider before you give debugging over USB 2.0 a try.

Related Articles
Enabling Debugging on the Local Machine for Windows XP®
More on Kernel Debugging - KMODE_EXCEPTION_NOT_HANDLED
Making WinDbg Your Friend - Creating Debugger Extensions
Life Support for WinDbg - New Windows NT Support Tools
Special Win2K PnP Tracing and Checks
Choose Your Weapon: Kernel Mode Debuggers - a Choice at Last
Wild Speculation -- Debugging Another Crash Dump
Resolving Symbol Problems in WinDBG
Getting DbgPrint Output To Appear In Vista and Later
I Hooked Up The Debugger Using 1394, and NOW...

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

"My experience"

14-May-07, Satya Das

Post Your Comments.
Print this article.
Email this article.
bottom nav links