I’m debugging a legacy Delphi service application (it is old but compiled with Delphi 2010). The service dies as soon as it starts, but the GUI version of the same app doesn’t.
When I tried to debug the service, I realized that it gets past the Application.Run method and exists gracefully. No exceptions seems to be thrown, unless debugging services has some quirks that I’m unaware of.
Before the calling of Application.Run, a Data Module and DataSnap are started. Everything seems to run smoothly.
So, my question is: how can I debug this? Stepping into Application.Run is the same as stepping over in this case.
You need to tick Debug DCUs in the compile options for the project to be able to step through VCL code under the debugger.