Debugging C. DLL files from a C # application

I have a C # application that uses some C libraries (which I wrote and built using gcc). I am trying to investigate an error and would like to enter C code while debugging my C # application in VS2008. How do I create C libraries with debugging information that I need for visual studio?

+4
source share
1 answer

One thing you must do is enable unmanaged code debugging. Right click on your project -> Properties -> Debugging -> Check the box "Enable unmanaged code debugging" (note that the image below is from VS2010, but VS2008 should look similar):

VS 2010

Step 2 - Create Your DLL With Proper Debugging Information (PDB).

Microsoft has several guides for debugging in mixed mode:

There are several questions on SO related to the topic: How to connect a debugger to switch to our own (C ++) code from a managed (C #) shell? and Debugging Visual Studio 2010 DLL Project

+1
source

Source: https://habr.com/ru/post/1402920/


All Articles