Home - Programming - Delphi Debugger

One of the most important tools for a developer is the debugger. Not ChatGPT, not the cool hotness language/framework according to StackOverflow, not unit testing, none of it. The most important tool provides the ability to trace step by step through your code and see exactly how the thoughts you enshrined in code actually play out in real life.

Given that, the debilitating issues with remote debugging in Embarcadero's Delphi debugger are causing me delays that I simply cannot afford. If I'm debugging locally, it's no problem, but if, as is often the case, I need to live debug an process inside a test VM, the issues I run into can bring me to a full halt for hours.

When remote debugging, Delphi has the ability to put all the necessary debug symbols inside a file with the extension .RSM (remote symbol map). That file is loaded when the debugger, coming in through the PAServer process used for managing remote debugging sessions, attempts to load the executable and connect to the process. Those symbols are used to match up the executable and heap space to the source code. And that works great, if and only if the RSM is generated properly

And therein lies the rub. Today (not yesterday, not the days weeks, and months before) Delphi has decided it won't build the RSM file. It can build the executable just fine, but the RSM refuses to appear in the same directory, or anywhere else near as I can tell. Not on the local build machine, not on the remote VM.

Compiling flags:
  • Optimization turned off
  • Debug information turned on
  • Local symbols turned on
  • Symbol reference info set to Reference info
Linking flags:
  • Debug information turned on
  • Include remote debug symbols turned on
  • Map file off
  • Place debug information in separate TDS file turned off

    There's one other factor. The currently active project profile I'm using is a child profile of Debug called "MintTGETest-Debug". It specifically references the test VM, the directories, etc.

    I wonder....

    [some fiddling, lot's builds, more fiddling...]

    Okay, now I'm irritated. Turns out, if I set the active profile to "Debug" and set it up exactly the same as its child profile, it works. The RSM file is now building.

    You'd think someone out there would have run into this already, and I'm sure they have, but Embarcadero's staff perhaps isn't familiar with the unit testing tools they produce. I'd recommend they build sufficient unit tests to cover, at a minimum, the basic usage of the features they provide.


    Todd Grigsby