Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugger
Message
De
18/02/2016 12:52:26
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
18/02/2016 12:15:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 7
Database:
Oracle
Application:
Desktop
Divers
Thread ID:
01631676
Message ID:
01631682
Vues:
49
>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.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform