I have C# application that makes use of some C libaries(which I have written and built using gcc). I’m trying to investigate a bug and would like to step into the C code when debugging my C# application in VS2008. How do I build my C librarys with the debug information I need for visual studio?
Share
One thing you should do is to enable unmanaged code debugging. Right-click on your project -> Properties -> Debug -> Check the “Enable unmanaged code debugging” (note that the image below is from VS2010, but VS2008 should look similar):
Step 2 is to build your DLL with the proper debugging information (PDB).
Microsoft has some tutorials on debugging in mixed mode:
There are several questions on SO related to the topic:
How to attach debugger to step into native (C++) code from a managed (C#) wrapper? and Debugging Visual Studio 2010 DLL Project