I have a solution with an unmanaged c++ dll project in it and a c# managed project that calls dll using PInvoke. Is it possible to debug both managed and unmanaged code so that I see what is going on "inside" of that dll?
Enable mixed-mode debugging for a managed calling appEnable native code debugging in the properties. For C#, select Debug in the left pane, select Open debug launch profiles UI, then select the Enable native code debugging check box, and then close the properties page to save the changes.
Visual Studio Code supports the following debuggers for C/C++ depending on the operating system you are using: Linux: GDB. macOS: LLDB or GDB. Windows: the Visual Studio Windows Debugger or GDB (using Cygwin or MinGW)
Yup. If I'm not mistaken, it should do this automatically, as long as the profile is set to "Debug".
Edit: Oh, I forgot one thing: In the debugging options for the managed project, make sure you have the option "Enable unmanaged code debugging". Then it should step into the unmanaged code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With