VisualDDK - develop/debug drivers directly from VS

Overview

Welcome to the VisualDDK homepage. This project brings the simplicity and convenience of Windows application development to the driver development world. No more manual creation of build scripts, copying of driver files, installing drivers from INFs, switching between WinDbg and the source editor or waiting for seconds after each step due to the extra-slow virtual COM port. Just create a driver project using a convenient Driver Wizard, select a virtual machine, and enjoy debugging your driver directly from Visual Studio. Want to test a change? Just normally press Shift-F5, modify your driver, rebuild it and launch again. VisualDDK will unload the old driver, install the new one and load it automatically and quickly. Bored with WinDbg loading symbol files for minutes and looking up symbols for seconds? Just let VisualDDK optimize this for you using its own DIA-based symbol engine. Using C++/STLPort in your drivers? VisualDDK will natively visualize all STL containers and strings, as good as Visual Studio does for user-mode applications.

Note that Visual Studio by default queries lots of values from debuggee after each break/step (such as Autos, all locals, call stack, etc.). If you are planning to use VisualDDK with VMWare or VirtualBox, use the VirtualKD project (installed with VisualDDK), that replaces Virtual COM Port for VMWare and VirtualBox machines by a native KD interface, speeding up debugging ~18x for VMWare and ~48x for VirtualBox. Nevertheless, see the debugging speedup guide for more details.

Latest version

The latest version of VisualDDK is 1.4.

Features

  • Allows developing, building and debugging drivers directly from Visual Studio.
  • Fully compatible with Windows 7 and Visual Studio 2010.
  • Allows creating projects based on existing code.
  • Contains a Driver Wizard allowing to create new driver projects or import existing code.
  • Provides a Launcher allowing to copy and start your drivers on a remote machine directly from VS.
  • Loads kernel symbols much faster than WinDbg.
  • Resolves symbols by names (or indicates an error) much faster than WinDbg by using hash tables and DIA interface.
  • Visualizes NT types in a convenient way (see Expression Visualizer and VisualDDKHelpers pages).
  • Based on WinDbg debugging engine, thus, supports all connection types, protocols, settings and console commands, supported by WinDbg.
  • Automatically completes WinDbg commands, similarily to Visual Studio's IntelliSense.
  • Visualizes STL containers used in drivers

Screenshots

A typical debugging session with VisualDDK looks like this:



(click to enlarge)

This is the Driver Wizard window, allowing you to create new driver projects directly from Visual Studio IDE:


(click to enlarge)

This is the Visual Studio watch window illustrating, how the Expression Visualizer works:



(click to enlarge)

This is the VisualDDK Launcher setup dialog that allows selecting, how exactly is your driver copied to remote machine and launched there:


(click to enlarge)

Downloading

VisualDDK 1.4 can be downloaded directly here: VisualDDK-1.4.exe (2.2 MB)

Compatibility

VisualDDK supports developing & debugging both x86 and x64 drivers on both singleprocessor and multiprocessor systems. The following versions of Visual Studio are supported:

  • Visual Studio 2005
  • Visual Studio 2008
  • Visual Studio 2010

VisualDDK was tested with the following versions of DDK/WDK:

  • Windows XP DDK build 2600.1106
  • WDK build 6000
  • WDK build 7600

Installation

Running the provided installer for VisualDDK is enough to setup the debugging environment on your machine. However, if you want to use the VisualDDK Launcher to launch your driver on remote machine, you should copy the target/(platform)/DDKLaunchMonitor.exe file from VisualDDK directory to your debugged machine, and launch it there. Please also ensure that your firewall allows sending TCP and UDP packets to the machine being debugged.

Note that if you are using VirtualBox or VMWare for debugging, you can speed up driver debugging by using VirtualKD instead of the usual virtual COM port. Just copy target\vminstall.exe from VisualDDK folder to your virtual machine, run it from there and let it restart your VM. Afterwards, select the Virtual Machine itself instead of a named pipe in VisualDDK launcher. You can also use vminstall.exe /AUTO /REBOOT for unattended installation.

Note that you also need to install the updated VirtualBox DLL. See this page for more details.

Bugs

Please do not hesitate to report all found bugs (please create dump files using Visual Studio) via the SysProgs.org Forum.