Reputation: 21
I am trying to set up remote driver debugging in visual studio 2015 professional with update2. My host computer is running in Windows 8.1 home-edition 64 bit, and the target is a separate computer which runs in Windows 10 home-edition 64 bit. I can provision/configure the target computer successfully via network, and next I press F5 to debug/deploy the KMDF driver, it takes about 2 minutes to deploy driver and then deploy's display stops, I think that deploy's process has finished, then I see the device-manager in the target site, the driver has been installed successfully, but when I press "break all" button to break the debugger, nothing is happened, it can't break the debugger, kd console window (ie, kd >) still is disabled(gray color), it can't enter any command. so this means that driver's deploy is not yet complete, but oddly no any error message about deploy is show, and the driver also is installed successfully in target site.
Below is the informaiton on the output of "Debugger Immediate Window" during deploy stage. This issue has taked me several weeks to solve it, but I still can't. I hope someone can help me or give me some advices, appreciated !
Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
SIMON\simon96 (npipe WinIDE_01D1BFBFC94007E3) connected at Mon Jun 06 14:51:00 2016
Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Using NET for debugging
Opened WinSock 2.0
Waiting to reconnect...
[14:51:01:965]: Remove Existing Remote Package
[14:51:02:028]: Task "Remove Existing Remote Package" completed successfully
[14:51:02:028]: Copy Driver Package
[14:51:02:434]: Task "Copy Driver Package" completed successfully
[14:51:02:449]: Driver Removal
[14:51:02:449]: Removing any existing files from test execution folder.
[14:51:02:543]: Copying required files for "Driver Removal".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=Test7KMDF_vs2015_u2.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=Test7KMDF_vs2015_u2.cer" /p:"PackageGuid=x64" /p:"HardwareId=Root\Test7KMDF_vs2015_u2" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Removal_00016.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:36:544]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:36:544]: Task "Driver Removal" completed successfully
[14:51:37:215]: Driver Preparation
[14:51:37:215]: Removing any existing files from test execution folder.
[14:51:37:262]: Copying required files for "Driver Preparation".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=Test7KMDF_vs2015_u2.inf" /p:"Debug=1" /p:"ImportDriver=1" /p:"RemoveDriver=1" /p:"CertificateFile=Test7KMDF_vs2015_u2.cer" /p:"PackageGuid=x64" /p:"HardwareId=Root\Test7KMDF_vs2015_u2" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Preparation_00016.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:48:934]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:48:934]: Task "Driver Preparation" completed successfully
[14:51:49:622]: Driver Install
[14:51:49:622]: Removing any existing files from test execution folder.
[14:51:49:763]: Copying required files for "Driver Install".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_RunProcess'" /p:"BinaryPath=%SystemDrive%\DriverTest\devcon.exe" /p:"Arguments=-f install %SystemDrive%\DriverTest\Drivers\Test7KMDF_vs2015_u2.inf Root\Test7KMDF_vs2015_u2" /p:"WorkingFolder=%SystemDrive%\DriverTest\Drivers" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Install_00008.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:51:58:653]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:51:58:653]: Task "Driver Install" completed successfully
[14:51:59:028]: Driver Post Install Actions
[14:51:59:028]: Removing any existing files from test execution folder.
[14:51:59:075]: Copying required files for "Driver Post Install Actions".
$KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Post_Install_Actions_00017.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
[14:52:07:560]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
[14:52:07:575]: Task "Driver Post Install Actions" completed successfully
Upvotes: 2
Views: 541
Reputation: 63
After spending a day, I found out something that worked for me.
Note: I used a static IP connection for Host and Target machines.
Step 1
Before you configure a target device on the host machine (using Visual Studio) for deployment on the target. On the Target Machine launch
Windows Firewall with Advanced Security
check the
Windows Firewall Properties,
in the Domain, Private and Public Profile set the
Inbound connections
to Allow. I additionally disabled the Firewall by setting the Firewall state to "Off" for all the Domain, Public and Private profiles.
Step 2
a) Configure the target device on the Host Machine using the Visual Studio Solution Explorer. Make sure you set the correct Bus Parameters of the Ethernet Adapter of the Target Machine. Looking into the Device Manager for Network adapters on Target Machine to check what Bus Parameters you need to set.
b) When you launch the Debugger it halts at the last step before the Deployment of the drivers on the target machine. You will see the below messages...
Waiting to Finish.. Waiting to Finish..
c) Check the static IP settings on the Target Machine; these get overridden with blank entries during the last stage of driver deployment. Correct the entries and make sure you can ping the Host from the Target and vice-versa.
d) After the above is done the Driver Deployment completes and you don't see any more "Waiting to Finish" messages (you may get an error related to setting the Restore Points. Ignore it)
Step 3
If everything goes fine you should see the below messages in the Debugger Immediate Window
Using NET for debugging
Opened WinSock 2.0
Waiting to reconnect...
[10:59:06:155]: Remove Existing Remote Package
[10:59:06:582]: Task "Remove Existing Remote Package" completed successfully
[10:59:06:601]: Copy Driver Package
Connected to target 169.254.31.204 on port 50839 on local IP 192.168.1.2.
Upvotes: 2