I am using Delphi TApplication.OnException Event to catch unhandled exceptions
This works well but does not give sufficient information about where the exception hap
Mostly related: Exception Handling in Delphi.
You can get the memory address where the exception was thrown by using the ExceptAddr variable (System unit). But if you want a stack trace you could use one of the 3rdParty tools MadExcept, EurekaLog or the open source JCLDebug (part of the JCL).
The simplest and quickest way would be to use the JCL exception and debugging support. After installing the JCL, make sure to insert the debug symbols into the binary (Projects -> JCL debug expert -> Insert JDBG data for this binary -> Enabled) and add a JCL exception dialog to the project (File -> New... -> Dialogs -> Exception dialog).
If the JCL installer fails to add that dialog to the object repository and it doesn't appear (happened to me a few times), either add it manually by copying the .pas and .dpr file from jcl-install-dir\experts\debug\dialog
into your project and adding them manually, or close Delphi, edit %DELHPIDIR%\bin\delphi32.dro
in a text editor and add something like this to it (adjusting the paths of course:)
[P:\DELPHI11\EXTERNALLIB\JCL\EXPERTS\DEBUG\DIALOG\EXCEPTDLG] Type=FormTemplate Name=Exception Dialog Page=Dialogs Icon=P:\DELPHI11\EXTERNALLIB\JCL\EXPERTS\DEBUG\DIALOG\EXCEPTDLG.ICO Description=JCL Application exception dialog Author=Project JEDI DefaultMainForm=0 DefaultNewForm=0 Ancestor= [P:\DELPHI11\EXTERNALLIB\JCL\EXPERTS\DEBUG\DIALOG\EXCEPTDLGMAIL] Type=FormTemplate Name=Exception Dialog with Send Page=Dialogs Icon=P:\DELPHI11\EXTERNALLIB\JCL\EXPERTS\DEBUG\DIALOG\EXCEPTDLGMAIL.ICO Description=JCL Application exception dialog Author=Project JEDI DefaultMainForm=0 DefaultNewForm=0 Ancestor=