>How to get the debugger to fire up when an error occurs in a compiled exe?
>Thanks!
As long as you run it from IDE
DEBUG opens the debuger
SUSPEND pauses
SET STEP ON does both
SET ASSERTS ON and a later ASSERT .f. (or ASSERT lExpression where lExpression returns .f. for that) suspends
if you do not run from IDE
none
in short terms
in your main.prg add function
FUNCTION On_Error
SET STEP ON
RETRY
ENDFUNC
in main add
ON ERROR On_Error
So the error should call the On_Error and you can singlestep back to the error.
Note, the example above only catches the error. Any information about the error given by all all the stuff like AERROR ERROR MESSAGE and so is up to you.
IOW simple catching and calling debugger is not enough.
See HELP ON ERROR for example.
Do not use this in code outside the IDE, any error will cause a loop.
HTH
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]