Debugging DLL's

Certain pointers on debugging DLL's in Visual Studio
Assuming you have the source code for both the calling application and the DLL.
  • Build both the application and the DLL projects in Debug mode.
  • On building the DLL you should get 2 files: a .dll and a .pdb. Place these 2 files in the folder containing the exe for the calling application. Or you could place it in another folder and specify its location. Please note that the pdb and dll should be created in one build. If  a mismatch occurs between the two, it might not be possible to debug your application.
  • Open the DLL's source code files in the same Visual Studio session as the calling application and put break points in them.
  • On stepping into the code from the calling application, you will now be able to debug the code for the DLL.
 Another way to debug DLL's is to start from the DLL project and mention the executable that calls the DLL.


Comments

Popular posts from this blog

endmenu in different file than menu?

Multi Threading in Android

A binary with debug symbols with the Android NDK