Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Kernel Debugging in Visual Studio

dotslashdotslash Member Posts: 1

I've been trying to set up driver debugging in visual studio without much success. I've got two computers running Windows 10 (Version 1803, Build 17134). At first, I manually set up kernel debugging on the target machine and was able to connect with windbg over the network. I then tried with visual studio without success. After not being able to connect with Visual Studio, I ran the automatic provisioning tool from Visual Studio. That created the 'wdkRemoteUser' account on my target computer, but did not help with debugging.

On the target computer, I'm able to type 'bcdedit /dbgsettings' and use the key from the output to connect with windbg from host. Attempting to use the same key with Visual Studio from the host appears to do nothing. The 'Debugger Immediate Window' is stuck on 'Waiting to reconnect'. I can't figure out why windbg will connect but visual studio won't. Any help is much appreciated!

Thanks!

Comments

  • GunasekaranGunasekaran Member Posts: 11

    @dotslash I was facing the same problem. Apparently, the remote debugger version that comes with VS is not compatible with KDNET version which I was using. May be that could be problem in your case but I am not sure.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 6,907
    edited January 4

    I’ll give you the short answer: Don’t do it.

    We strongly recommend NOT using the debugger interface within Visual Studio for kernel mode debugging.

    Run WinDbg directly and use that. I promise... absolutely promise... you’ll be happier in the long run.

    For user mode, the embedded debugger in VS is cool. For kernel mode work... it (and all the associated “deploy” stuff) is just something that make sure your job harder and less predictable, with almost zero benefit in return.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 4 Feb 2019 OSR Seminar Space
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Kernel Debugging and Crash Analysis 25 Mar 2019 OSR Seminar Space