DelphiFAQ Home Search:

Debugging a DLL in Windows XP

 

comments3 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

Question:

I used to debug DLLs in Delphi using Delphi's menu item 'Run Parameters' where I set the 'Host Application' to be any program which would load my DLL. This does not work on Windows XP any more.

Answer:

Run the program that loads the DLL from the Delphi IDE (yes, this means that it has to be a Delphi host application).

After this, switch back to the Delphi IDE and press Ctrl-Alt-M to list all modules. Sometimes there will be your DLL with path, but if not, then right click on the DLL, select 'Reload Symbol Table' and set the full path to the DLL. Then the breakpoints will be active.

If the DLL will be compiled in the system path (any directory on %PATH%) this problem dont occur.

Content-type: text/html

Comments:

2006-02-28, 15:52:19
anonymous from Australia  
rating
2006-03-01, 07:07:44
z_free from Bulgaria  
Actually reloading the Modules is very annoying and comsumes precious debugging time.

Unfortunately the

'If the DLL will be compiled in the system path (any directory on %PATH%) this problem dont occur. ' -- is not correct - although the DLL is in a %PATH% directory I still need to reload the modules.

Any ideas? :)

z
2009-07-16, 08:38:25
anonymous from Greece  
Just open a file from the output directory (Project\Options\Directories/Conditionals\Output Directory). Then run the program (you must already fill the Run\Parameters\Host Application and Run\Parameters\Parameters). Delphi should found the correct dll in right position to debug it!

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: