Knowledgebase: IDE
7.x: Can not debug my application after adding EurekaLog
Posted by Aleksandr Alekseev on 13 October 2022 11:24

Problem:

I can not debug my application in IDE after I have added EurekaLog. IDE's debugger is either fails to start / load or it runs executable with disabled breakpoints and no source code debugging.

P.S. Possible error message from IDE: "Debugger fatal error: debug kernel not responding. The debug process will be terminated."

P.P.S. It may happen in C++ Builder only.

 

Reason:

EurekaLog needs to change your executable by adding (injecting) debug information. Debug information is stored as an additional PE section. Our code takes extra care to keep changed (after injection) executable as similar to the original as possible: including restoring file timestamps, recalculating PE header CRC, etc.

However, sometimes it is not enough for IDE's debugger. It may fail to recognize your executable after modifications. Unfortunately, we are unlikely to fix such issue from our end, as IDE's debugger is essentially a black box for us with little to no control. What we can do is a bit of woodo magic, trying to understand things that it does not like.

We have reports from our customers that sometimes C++ Builder refuses to debug executable. Either failing to load / run, or running executable without debug information (e.g. breakpoints are disabled; no source code debugging, etc.). On the other side, we did not have a single report about such cases for Delphi.


Solution:

  1. Report the issue to the Embarcadero's bug tracker;
  2. Upgrade to the latest IDE;
  3. Apply/install all latest IDE's service packs / updates / patches;
  4. Switch "Debug Information" option from "Inject" to "Add";
  5. If the above does not help - go to "Project" / "EurekaLog options" / "Advanced" / "Custom/Manual" and look for the DoNotTouchEXE option. If not found - add it like so:
    DoNotTouchEXE=1

 

Important Notes:

Switching the "Debug Information" option from "Inject" to "Add" (or using the DoNotTouchEXE=1) is supposed to be a temporal workaround for debugging. Please note that your executable will not be self-sustained with either of these options:

  • you need to deploy .edbg file with your executable;

or

  • recompile with "Inject" (DoNotTouchEXE=0) option for production.

Please note that if you use the DoNotTouchEXE=1 option - then EurekaLog will not touch (open) your executable at all. So if you still have your issue while using that option - then EurekaLog has absolutely nothing to do with the issue.

 

See also:


Help Desk Software by Kayako Resolve