Debugging driver

Developer
Jan 21, 2010 at 7:50 AM

I wanted to ask you guys how you are debugging the driver. I tried to setup Visual Studio to run the project but it won't even compile it. So far I'm building it from command line inside proper DDK environment. I created a simple batch file to install the driver for me (install.bat). I also added some WPP tracing so I can watch output in TraceView. But so far I didn't manage to actually debug the code, so I'd appreciate any advice on this.

Developer
Jan 22, 2010 at 11:02 PM

Attached is a helpful blog post for debugging user-mode (wpd) drivers in Visual Studio. You can use this same technique to debug the Generic Serial driver: http://blogs.msdn.com/wpdblog/archive/2007/02/01/debugging-your-wpd-driver-with-visual-studio-8.aspx

(Also note that Visual Studio 2005 forward supports Tracepoints -- which allow you to view real-time data traces while debugging the driver.)

Developer
Jan 30, 2010 at 11:35 PM
Edited Jan 30, 2010 at 11:49 PM

I'm attaching a screenshot that shows output from the Memsic 2-axis accelerometer as it was captured using a Tracepoint in Visual Studio.

Well, I couldn't figure out how to post an image to this thread. So, I've attached an image (tracepoint.jpg) to the IssueTracker tab. See http://win7sensorserial.codeplex.com/WorkItem/View.aspx?WorkItemId=3868