Reputation: 1775
My problem is that there is an Exception being raised in some part of the System, but it happens during initialisation and I can't figure out where or which exception it is. The system just begin to run and then it closes suddenly.
Do you have any methods to debug such a situation?
I am using Delphi5, just in case.
Upvotes: 1
Views: 1277
Reputation: 131
Have you get/found where the problem is after using those accepted answer (debugger tool)? Are you using lib/component that require some DLL? As my experience (exception doesn't appear and app closes suddenly); it is because something on your part unable load a DLL. The exception won't show in debug mode, but it'll appear when you just run the app (not in debug-Delphi).
Upvotes: 0
Reputation: 125669
Download MadExcept. It works for Delphi 5, is free for non-commercial use (and is a definite bargain for commercial use), and works really well tracking down all sorts of mysterious exceptions.
Upvotes: 3
Reputation: 17203
Start the application with the F7 (step into) command, this will jump to the first unit initialization... you can then use the F7 or F8 as usual to debug any unit initialization section until you find the source of your exception.
This is sometimes a tedious work to debug the initialization... while you're making progress, you can put regular breakpoints in initialization sections to start again from a known point.
Upvotes: 2