Configuring a Computer for Driver Deployment, Testing, and Debugging

In this topic, we explain how to configure a computer for automatic driver deployment, testing, and debugging. Using Microsoft Visual Studio to configure and set up driver deployment and driver testing is called provisioning a target computer or provisioning a test computer.

A testing and debugging environment has two computers: the host computer and the target computer. The target computer is also called the test computer. You develop and build your driver in Visual Studio on the host computer. The debugger runs on the host computer and is available in the Visual Studio user interface. When you test and debug a driver, the driver runs on the target computer.

Before you can use the Visual Studio driver development environment to deploy, test, and debug a driver, you must provision the target computer. You can provision the target computer over an ordinary network connection by using Visual Studio on the host computer. The host and target computers must be in the same network domain or workgroup. Provisioning is not supported for virtual machines. If your computers are in a workgroup, we recommend that you connect the computers with a router rather than a hub or switch.

Before you provision your target computer, decide which type of connection you want to use for debugging, and obtain the required debugging cable. Windows supports these types of connections:

  • Network
  • USB 3.0
  • USB 2.0
  • 1394 (Firewire)
  • Serial

If your target computer is running Windows 8 or later, you can use any type of connection for debugging. For example, you can use a network connection for debugging. In that case, the network connection serves as the communication medium for the provisioning process and for debugging.

Host and target computers with network connection

If your target computer is running a version of Windows prior to Windows 8, you cannot use a network connection for debugging; you must use a USB, 1394, or serial connection. However, you must have a network connection for provisioning.

Host and target computers with network and debugging connections

For more information about the different types of debugging connections, see Getting Set Up for Debugging.

Provisioning the target computer

There are a few things that you need to do before you provision the target computer. The steps depend on which version of the Windows Driver Kit (WDK) you are using. For instructions, see one of these topics:

After you have prepared the target computer, you can provision the target computer from the host computer in Visual Studio.

  1. On the host computer, in Visual Studio, on the Driver menu, choose Test > Configure Computers.
  2. Click Add new computer.
  3. For Computer Name, enter the name of the target computer.

    Note  If you enter an invalid computer name or the name of a computer that has already been configured, a yellow exclamation mark (!) appears to the right of the computer name.

  4. You have 3 options as shown here.

    Screenshot of Computer Configuration dialog box showing three provisioning options: 1) Provision computer and automatically configure debuggers, 2) Provision computer and choose debugger settings, or 3) Manually configure debuggers and do not provision

    If your target computer is running Windows 8 or later, and your target computer has a network adapter that supports network debugging, you can select the first option, Provision computer and automatically configure debuggers. You can see a list of network adapters that support network debugging here.

    Note  This option creates a port number for network debugging and does not give you the opportunity to change the port number. If your company has restrictions on which port numbers can used for network debugging, select the second option.

    If your target computer is running a version of Windows prior to Windows 8 or if you want to use one of the other types of debugging connection (USB, 1394, serial), select the second option, Provision computer and choose debugger settings. With this option, you can choose the type of debugging connection. If you choose a network debugging connection, you can choose the port number and the encryption key.

    If you want to configure Visual Studio on the host computer for debugging, but do not want to touch the target computer, select the third option, Manually configure debuggers and do not provision. This option does not configure debugging on the target computer. You must configure debugging on the target computer manually by using bcdedit.

    Click Next.

  5. If you selected the second or third option in the previous step, you have an opportunity to configure the debugging settings. For Connection Type, choose the type of debugging connection you want to use: Network, Serial, Firewire, or USB. After you have chosen a connection type, fill in the rest of the fields or accept the default values.

    Screen shot showing an example of debugger settings with values for the following fields: COnnection TYpe, Port Number, Key, Host IP, and Bus Parameters

    For more information about configuring the different types of debugging connections, see Getting Set Up for Debugging.

    Click Next.

  6. If your computers are joined to a workgroup, you might be asked for credentials to access the target computer. Enter TargetComputerName\Administrator, where TargetComputerName is the name of your target computer. Enter the password for the Administrator account on the target computer.
  7. The provisioning process takes several minutes and might automatically reboot the target computer once or twice. When provisioning is complete, click Finish.

Note  If you are using network debugging, and if your host and target computers are connected through a router, verify that the network adapters on your host and target computers have obtained IP addresses from a Dynamic Host Configuration Protocol (DHCP) server. The kernel debugging driver on the target computer attempts to use DHCP to get a routable IP address for the network adapter that is being used for debugging. If the driver 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. You can use local link IP addresses for network debugging if the host and target computers are plugged into the same network hub or switch.

Debugging after provisioning

After you provision a target computer, you can establish a kernel-mode debugging session from Visual Studio on the host computer. For more information, see Performing Kernel-Mode Debugging Using Visual Studio. You can also debug a user-mode process on the target computer from Visual Studio on the host computer. For more information, see Debugging a User-Mode Process Using Visual Studio.

Note  

If you are using separate host and target computers, do not install Visual Studio and the WDK on the target computer. Debugging is not supported if Visual Studio and the WDK are installed on the target computer.

Removing provisioning from the target computer

Once you have provisioned a target computer, you cannot completely remove the provisioning. However, you can remove most of the provisioning from the target computer by using Visual Studio on the host computer. Here are the steps.

  1. On the host computer, in Visual Studio, on the Driver menu, choose Test > Configure Computers.
  2. Select the name of the target computer, and click Delete computer.
  3. Select Remove provisioning and delete computer. Click Next.
  4. When the removal process is complete, click Finish.
  5. (WDK 8.1 only) Uninstall WDK Test Target Setup from the target computer. For more information, see Preparing a Computer for Provisioning (WDK 8.1).

Related topics

Developing, Testing, and Deploying Drivers
What happens when you provision a computer (WDK 8.1)
What happens when you provision a computer (WDK 8.0)

 

 

Send comments about this topic to Microsoft

Build date: 1/23/2014

Show:
© 2014 Microsoft. All rights reserved.