mhk
mhk

Reputation: 345

debug a debug dll linked to a release executable

In visual studio how can I debug/step into calls made by an exe to a library ? The exe is available only in release mode and calls the library which is built in debug mode I made a simple vs solution with just the exe and started it ..then I opened a source file from the binary and added breakpoints.. but vs doesnot activate the breakpoints saying "no symbols loaded for this file" ...obviously I am missing something here.. (if I remember correctly I used to be able to debug the calls before)

Upvotes: 2

Views: 177

Answers (1)

Benj
Benj

Reputation: 32398

You can debug binaries that are built in release mode with the following caveats:

  1. You'll need the pdbs which were built against the release library.
  2. Breakpoints will not be possible in any code which has been inlined/optimized away.
  3. Depending on the architecture certain variables values will be hidden/garbage, you have to take things with a pinch of salt when debugging release binaries.

To add PDB files for the release binary, go to:

Debug -> Options and Settings -> Symbols

Upvotes: 1

Related Questions