none
"Waiting to connect to target..." when debugging a kernel mode driver from VS2012.

    Question

  • Hello. 

    I have two Windows 7 64-bit machines connected by a serial cable. I am trying to debug a driver on the target machine and I did the following: 

      • Installed clean Win 7 OS on the target machine.
      • Run VS2012 to provision the target machine with the serial connection.
      • Compiled the driver for Win 7 Debug on 64-bit platform.
      • Started the kernel debugger from VS2012. 

    It seems that everything is OK, but I'm unable to break. The status bar on the debugger immediate window reads "Waiting to connect to target..." and nothing is happening. If I try to Debug->Break All, nothing is happening. Can anyone suggest what I'm doing wrong?

    The output in the Debugger Immediate Window is: 

    -----------------------------------------------------------------------
                      Starting New Debugger Session         
    -----------------------------------------------------------------------
    -----------------------------------------------------------------------

    Microsoft (R) Windows Debugger Version 6.2.9200.16384 AMD64
    Copyright (c) Microsoft Corporation. All rights reserved.


    Microsoft (R) Windows Debugger Version 6.2.9200.16384 AMD64
    Copyright (c) Microsoft Corporation. All rights reserved.

    Opened \\.\com1
    Waiting to reconnect...
    MYCOMPUTER\username (npipe WinIDE_01CD9CD4B230C19D) connected at Thu Sep 27 10:22:40 2012
    [10:22:40:563]: Removing any existing files from the remote driver folder[10:22:41:116]: Removing any existing files from test execution folder
    te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=KMDFDemo.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"HardwareId=Root\KMDFDemo" /p:"CertificateFile=KMDFDemoPackage.cer" /p:"PackageGuid={A23BA0FC-7265-4E3C-B99F-1E7A04AD970D}" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Removal_(x64)_(possible_reboot)_00022.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated[10:22:53:465]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0[10:22:53:706]: Removing any existing files from test execution folder
    te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=KMDFDemo.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"HardwareId=Root\KMDFDemo" /p:"CertificateFile=KMDFDemoPackage.cer" /p:"PackageGuid={A23BA0FC-7265-4E3C-B99F-1E7A04AD970D}" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Preparation_(x64)_(possible_reboot)_00022.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated[10:23:02:965]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0[10:23:03:208]: Removing any existing files from test execution folder
    te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_RunProcess'" /p:"BinaryPath=%SystemDrive%\DriverTest\devcon.exe" /p:"Arguments=-f install %SystemDrive%\DriverTest\Drivers\KMDFDemo.inf Root\KMDFDemo" /p:"WorkingFolder=%SystemDrive%\DriverTest\Drivers" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Install_(x64)_(possible_reboot)_00019.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated[10:23:11:280]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0[10:23:19:625]: Removing any existing files from test execution folder
    te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Logs\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Logs\Driver_Post_Install_Actions_(x64)_(possible_reboot)_00022.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated[10:23:22:740]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0[10:23:22:958]: Driver Installation summary:[10:23:22:966]:   Driver Removal (x64) (possible reboot): Pass[10:23:22:975]:   Driver Preparation (x64) (possible reboot): Pass[10:23:22:984]:   Driver Install (x64) (possible reboot): Pass[10:23:22:994]:   Driver Post Install Actions (x64) (possible reboot): Pass

    Thursday, September 27, 2012 5:27 PM

All replies

  • Same issue here.
    Saturday, October 13, 2012 11:29 PM
  • I'm having same issue as well. All setup goes well,  but the host keeps showing "Waiting to connect to target".  And, there is no way to "break". I also tried to set up the driver deployment from Visual Studio, and there's no "Deployment" option under "Driver Install" in the project properties (according to this link http://msdn.microsoft.com/en-us/library/windows/hardware/hh454835(v=VS.85).aspx).

    Tuesday, November 27, 2012 1:36 AM
  • I have the same issue.

    Saturday, January 05, 2013 2:34 AM
  • try running bcdedit /dbgsettings on the target machine.
    then compare it to the target computer settings in configure remote computers window in VS2012

    It happened to me more than once that debug settings on the host and on the remote were different!

    This in spite of the deployment procedure finishing correctly.


    • Proposed as answer by Sirotnikov V Sunday, January 06, 2013 11:56 AM
    • Edited by Sirotnikov V Sunday, January 06, 2013 11:56 AM
    Sunday, January 06, 2013 11:56 AM
  • i have the same issue and i campared setting in host and target and made sure they are the same. However, the problem is still there.
    Sunday, April 28, 2013 1:13 AM
  • I have the same error message. I have checked settings. Has anybody resolved the issue ?
    Sunday, September 01, 2013 9:59 AM
  • Looks like the debugger isn't able to connect to the target machine.

    Are you able to debug between those two computers through serial by using WinDbg? If not, than this is a debugging issue which is not related to the VS integration of the Windows Debuggers.


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 03, 2013 5:29 PM