Debug c++ dll in C#

Custo picture Custo · Jun 30, 2009 · Viewed 27.5k times · Source

I have a .dll from c++ and I want to debug it in C#, but I don't know how to.

When I compiled the c++ project, Visual studio asked me to execute an ".exe".

I supposed that I had to create a project to execute the dll.

But I am lost, how could I debug it?

Answer

CCicotta picture CCicotta · Jun 30, 2009

If I understand you correctly, you want to debug a C++ coded DLL that you created, in a C# project that calls the DLL, which you also created?

I've done this before by going into your C# project properties, and under the Debug section, checking the "Enable unmanaged code debugging" check box. This should allow you to step into your C++ DLL.