delphi64-bitdelphi-xe6

Unable to debug 64-bit application in release configuration, with Debug information enabled


I am trying to debug an application that is in Release Configuration - 64-bit Windows platform, but no breakpoints will hit.

I have enabled the Compiler Debug Information option:

enter image description here

I can debug the application when it is in the 32-bit release configuration; the breakpoints work fine.

| Configuration | 32-bit     | 64-bit     |
|---------------|------------|------------|
| Debug         | Debuggable | Debuggable |
| Release       | Debuggable | Fails      |

All with "Debug information" set to "Debug information", 
and full build (Shift+F9) before running.

So three questions:

Bonus Screenshots

32-bit release linker options:

enter image description here

64-bit release linker options:

enter image description here


Solution

  • I think you need to enable debug information in the linker options. At least, when I disable that, breakpoints are not hit, and when I enable that setting, breakpoints are hit.

    In summary, from what I can tell by using the trusted technique of trial-and-error, you need the following to enable debugging: