none
Win10+VS2015 Can't Debug WDF Driver(WmdfHelloWorld) RRS feed

  • Question

  • I'm a newer for driver development. So I refer this Write a universal Hello World driver (KMDF) . When configuration completed,  I want to debug for step over, so toggle breakpoint in DrvierEntry() funcation, but cannot enter a breakpoint, why?

    Env. : Win10 x64
    (Host and target PC both)
    The driver can be deployed to target PC, and can work well. (Already test in target PC, WinObj or Device Manager can see it, and can communicate by applications).

    And other question is why not anything log out? (KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "...")); invalid), so I refer this Reading and Filtering Debugging Messages. I modify the registry("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter" DEFAULT=dword"0x8 or 0xF" does not work.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.


    Thursday, June 2, 2016 11:12 AM

Answers

All replies

  • At now, I could output log by call KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "XXX"));

    Anybody can help me how step over to debug driver in VS2015?

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Tuesday, June 7, 2016 7:32 AM
  • Hi,

    Make sure you enabled kernel debugging on the target machine. You can refer to this article: https://msdn.microsoft.com/en-us/library/windows/hardware/hh439346(v=vs.85).aspx

    Does DriverEntry break into the debugger if you hardcode a DbgBreakPoint() call in it? WinDbg is also worth looking into as an alternative to debugging with VS.

    • Marked as answer by VisualEleven Friday, June 17, 2016 2:22 AM
    Tuesday, June 7, 2016 11:01 PM
  • Hi,

    Make sure you enabled kernel debugging on the target machine. You can refer to this article: https://msdn.microsoft.com/en-us/library/windows/hardware/hh439346(v=vs.85).aspx

    Does DriverEntry break into the debugger if you hardcode a DbgBreakPoint() call in it? WinDbg is also worth looking into as an alternative to debugging with VS.

    Thanks for you reply, I will try.

    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.

    Monday, June 13, 2016 1:22 AM
  • ...

    Does DriverEntry break into the debugger if you hardcode a DbgBreakPoint() call in it? WinDbg is also worth looking into as an alternative to debugging with VS.

    hardcode a DbgBreakPoint() , that works! Thanks!
    Thursday, March 30, 2017 11:42 AM