2

I'm having some troubles debugging a solution which contains both a native ANSI C DLL project and a managed C#/WPF application project.

I call the functions exported by the DLL using the LoadLibrary/GetProcAddress Win32 API functions (DllImport attribute is not applicable for my program as the DLL is selected by the user). Both projects are built using the Debug configuration. The native DLL is copied to the bin/Debug directory of the C# program. When I debug the C# project, I can't step into the native code.

Is there a way to step into the native code?

It works when I debug the DLL project using the C# program, but then I can't step into the managed code...

I'm using Visual Studio 2010 Professional and Visual Studio 2010 Ultimate.

lg, Dominik

Dominik
  • 21
  • 2

1 Answers1

4

In your C# Project: Project + Properties, Debug tab, tick "Enabled unmanaged code debugging". Single stepping from managed code into unmanaged code isn't going to work. You need to set a breakpoint on the DLL function you want to debug.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Is it possible somehow by working a bit more to allow stepping in native code from managed code ? – Olórin Jan 31 '14 at 14:27