C++ – Visual Studio 2005 VB debugging with c++ dll – Mixed Language debugging

cdebuggingmixedvisual-studio-2005

I have a vb project which calls functions in a dll.
The dll is created in a separate vs project (portaudio), which is written in c.

The dll c project compiles clean and builds the required dll, which I am currently dropping in c:\windows\system to vb runtime can see it.

VB Project lives in c:\devprojects\vbtest

C Project lives in c:\devprojects\portaudio with the project file in c:\devprojects\portaudio\build\msvc. Dll created in Win32\debug under this msvc directory.

When I call the dll function, is it possible for the vs debugger to step through the c function in the dll – I have all the code etc, but I don't know if VS2005 supports this kind of mixed language debugging.

If this is possible, could you advise how I should set up my Visual Studio to achieve this.

Many thanks
David

Best Answer

It is not necessary to have both projects in the same solution, but you should compile both projects with debug symbols enabled.

Now in your VB net solution Project/Properties, in the Debug tab make sure that "Enable unmanaged code debugging" is checked.

Also make sure that the dll loaded is in the same place where it was compiled, else it may not found the pdb where the debug symbols are stored.

Related Topic