views:

70

answers:

1

I have a program written in VB.Net (Visual Studio 2008) that uses a DLL written in Visual C++ by another developer. I'd like to be able to step in to the C++ code as my code makes calls to methods in the DLL. Since the DLL is it's own solution, I don't think it can be included in my solution/project. I tried putting the DLLs pdb file in the debug/bin directory with the rest of my build and pdb files. However, when I get to the point in stepping through my code, and it gets to the dll call, it just steps right over the dll code. Do I have to manually load symbols? Not sure what I'm doing wrong. Thanks.

+1  A: 

There are 3 things you need to do here in order to debug this DLL. The first, as you mentioned, is to make sure the symbols for the native DLL is loaded,

The next is to enable unmanaged debugging since the DLL is native code. To do this

  • Right Click on the Project
  • Go to the Debug tab
  • Check the "Enable Unmanaged Debugging" check box

The last thing is to disable "Just My Code" for the project. I don't recall if this is strictly necessary when the second DLL is native. But in general it's good practice if you're debugging code which is not a part of your solution

  • Tools -> Options
  • Go to Debugging -> General
  • Uncheck "Enable Just my code"
JaredPar