can't debug datamodule in DLL at application server delphi

145 views Asked by At

I wanted to debug a data module that I've created and which is a part of a DLL, but for some reasons, I can't debug it. The debugger doesn't seems to be hitting the break point, is there a way i can debug my Dll/ data module.

2

There are 2 answers

0
fpiette On

To debug the DLL, the project loaded in Delphi must be the DLL itself. You enter a host application (Your application server executable), the one which will load the DLL. Make sure the host application load the DLL exactly where you have built it. You cannot move the DLL once constructed.

If the DLL must be in some fixed place, be sure to set the DLL's project options so that the DLL is produced at the right place.

And of course you must activate the debug build configuration for the DLL.

Using a tool such as ProcessExplorer (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer), you can see if the DLL you built was actually the one loaded by your application server.

0
Miroslav Penchev On

Check list:

  • be sure your DLL have included debug info
  • if it's COM DLL - be sure it is registered on same place where you build it
  • try to rebuild the DLL, rebuild the App if you have changed the interface
  • check in EventLog when debugger loads the DLL does it says it have or dont have debug info.