none
Debuging a Dll in WinDbg (64) RRS feed

  • Question

  • How do I debug a dll (not a .exe) in WinDbg (64 bit version)..?

    I have tried creating a test project (C# .exe) that calls the dll, and tried stepping through the test project (using WinDbg), but I can't find a way for it to step through the method called in the dll.

    Saturday, January 12, 2013 7:59 AM

All replies

  • Did you attach the debugger to the debugged process?
    Saturday, January 12, 2013 9:13 AM
  • Typing
     
    bp USER32!SetWindowTextW
     
    will break on the function SetWindowTextW in user32.dll.

    --
    .
    --
    "damianrflynn" wrote in message news:3d307a1c-e4fd-43a5-9457-c930913bdb46...

    How do I debug a dll (not a .exe) in WinDbg (64 bit version)..?

    I have tried creating a test project (C# .exe) that calls the dll, and tried stepping through the test project (using WinDbg), but I can't find a way for it to step through the method called in the dll.


    David Candy
    Saturday, January 12, 2013 9:28 AM
  • For you said your exe is a managed app (c#) and windbg does not support source-level debugging of managed code, I would recommend Visual-Studio-Debugger, if you want to step-into your dll, managed or unmanaged - especially since VS-debugger also does support sos-extension-dll.
    If your dll is native you certainly can add deferred breakpoint(s) in interesting dll-function(s) at startup with bu and then move around in your native-dll.
    But for a managed app/dll you have to use !bpmd cmd from sos.dll (sosex extension also has managed breakpoint support), which is by far more inconvinient to use, and may not give you the user-experience you are accustomed to from VS.

    With kind regards

    Saturday, January 12, 2013 10:51 AM