Microsoft Visual Studio: debugging multiple projects at once (an executable that accesses functions in the DLL + DLL used by the executable)

I was wondering how to debug several projects at once (in particular, a project that is embedded in an executable file and a project that is embedded in a DLL). In particular, I want to go through a DLL whose source is open to me.

I was wondering how to do this for C ++ and C # projects?

I think I know how to do this for the C # case:

  • Create a new solution.
  • Add both projects to the solution.
  • Create a DLL project (as a debug).
  • Add a link to the DLL created for the executable project (Should the working directory be the directory in which the debugging project of the DLL was built?)
  • Set the executable project as startup and debugging in normal mode; You should be able to set breakpoints in DLLs, etc.

Does this sound right? If not, can someone tell me what I am missing?

More importantly, how to do this for the C ++ case? Thank!

R

+3
source share
2 answers

It looks like you have most of the steps. Verify that the .pdb file is accessible to the debugger. The C ++ compiler will automatically create it in the output directory, but Visual Studio copies the DLL links as part of the C # build process and probably does not include all the important debugging data. Copying it to the C # output directory should be sufficient.

+2
source

? , exe . , .

0

All Articles