How to use Vs2022 Debugger to debug KMDF (windbg is ok but not vs)

HARMEL, Bernard 0 Reputation points
2024-09-23T08:14:16.4833333+00:00

Hello World,

I want to write and debug kmdf windows driver using visual studio 2022. I can debug my driver using a host and target computer using windbg and kdnet so my network config is ok.

When i try to configure visual studio 2022 i can build and link my driver but i have problem to deploy it. In visual studio in the properties of the project i have a Driver Install - Deploy option tab with several options:

  • Do not install
  • HardwareId of the driver
  • Custom command line
  • Install/reinstall and verify
  • Fast reinstall

Can you explain what are these options and tells me what i need to do to deploy my driver and debug it from vs2022.

If I select "do not install" and press F5, my driver compiles/links fine but at the end i have "Could not connect to the remote computer for deployment."

What do i need to check and is there any log to check ?

Rem: I can ping the target from my host, i can rdp the target from my host and windbg can connect and break into the kernel so what is wrong with visual Studio.

I know that OSR recommend to use windbg instead of visual studio but I would like to test it from visual studio.

Is there somewhere a web site which explain how to do this basic operation ?
https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/writing-a-very-small-kmdf--driver is not enougth

Thx in advance for your time and help

Best regards

Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
99 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.