none
Visual Studio 2013 Debugging Tools for Window - Kernel Debugger Not Work RRS feed

  • Question

  • Hi, i want to create a breakpoint on DriverEntry (KMDF), but visual studio just pause at "Driver Post Install Actions (x64) (possible reboot): Pass". I've tried on VMware and Hyper-V, and also Real Machine, they are have the same issue.

    To better illiustrate my question, i've created a video here and captured the steps i performed. Is there any steps i am missing???

    HOST Computer: Win 8 Pro 64 bits

    Target Computer (Real Computer): Win 8 Ultimate Trial version (Test Mode activated) 64 bits

    Screen Capture:

    http://www.dailymotion.com/video/x1p2pnn_visual-studio-2013-kernel-debugger-not-work_tech


    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)_00044.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*" /runas:Elevated
    [21:58:25:528]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
    [21:58:25:840]: Driver Installation summary:
    [21:58:25:840]:   Driver Removal (x64) (possible reboot): Pass
    [21:58:25:840]:   Driver Preparation (x64) (possible reboot): Pass
    [21:58:25:840]:   Driver Install (x64) (possible reboot): Pass
    [21:58:25:840]:   Driver Post Install Actions (x64) (possible reboot): Pass

    Thanks

    Ken



    • Edited by daiyoko_cc Thursday, April 17, 2014 2:37 PM add some spacing
    Thursday, April 17, 2014 2:31 PM

Answers

  • Thanks for the video, that's pretty helpful!

    It seems like the kernel debugger never actually connects (the last message from the debugger is "Waiting to reconnect..."). Are you sure that the debugger settings set on the target machine watch those you've set in VS and that your target machine's NIC supports kernel debugging over the network?

    If you go on the target computer and run "bcdedit -dbgsettings" in an admin cmd prompt, you will see the kernel debugger settings set there. Make sure that it is set to network, port 50816, with the key you've set in VS and the right host IP. The bus parameters, if set, should also match. If they are not the same, you can change them using the same process you are doing at 0:30 in your video.

    If that still doesn't work, I'd suggest trying to attach to your target using WinDbg (File -> Kernel Debug...  and simply enter your port number + key in the NET tab). Since the Visual Studio integration is essentially a wrapper of WinDbg, this should also fail, but sometimes WinDbg gives a better error message. In any case, once you get debugging to work in WinDbg, it should also work in Visual Studio.

    This MSDN page and this one might also be useful, depending on your familiarity with kernel debugging.


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

    Friday, April 18, 2014 6:34 PM

All replies

  • Thanks for the video, that's pretty helpful!

    It seems like the kernel debugger never actually connects (the last message from the debugger is "Waiting to reconnect..."). Are you sure that the debugger settings set on the target machine watch those you've set in VS and that your target machine's NIC supports kernel debugging over the network?

    If you go on the target computer and run "bcdedit -dbgsettings" in an admin cmd prompt, you will see the kernel debugger settings set there. Make sure that it is set to network, port 50816, with the key you've set in VS and the right host IP. The bus parameters, if set, should also match. If they are not the same, you can change them using the same process you are doing at 0:30 in your video.

    If that still doesn't work, I'd suggest trying to attach to your target using WinDbg (File -> Kernel Debug...  and simply enter your port number + key in the NET tab). Since the Visual Studio integration is essentially a wrapper of WinDbg, this should also fail, but sometimes WinDbg gives a better error message. In any case, once you get debugging to work in WinDbg, it should also work in Visual Studio.

    This MSDN page and this one might also be useful, depending on your familiarity with kernel debugging.


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

    Friday, April 18, 2014 6:34 PM
  • Hi, thank you for the reply. I would like to know how to check the bus parameter??? because my real machine (target computer) should have 2 NIC, in devmgmt.msc Location: PCI bus 11, device 0, function 1 <= how to set the paraemter a.c.d.... thanks. The kernel debugger works when i use Debug \ Attach to process and select Kernel. But i want to set breakpoint on the DriverEntry or DeviceAdd...
    Tuesday, April 22, 2014 5:34 AM
  • Look at this MSDN page, it is explained. You basically need to set it up at computer provisioning time from Visual Studio.

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

    Tuesday, April 22, 2014 3:52 PM