Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debug mode
Message
De
22/02/1998 10:08:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00080304
Message ID:
00080325
Vues:
28
There are a number of ways to do this. One way is to designate a file as a debug mode indicator.

IF FILE("debug.txt")
DEBUGOUT PROGRAM() && or whatever
SET ESCAPE ON
*... and so on
ENDIF


Now placing a file named DEBUG.TXT in the path gives you alternate behavior.

With this general mechanism in mind, I'd be prone to abstracting the process a little, like this:

IF oApp.DebugMode()
DEBUGOUT PROGRAM() && or whatever
SET ESCAPE ON
*... and so on
ENDIF

Where the code to test the mode is centralized. This way you could easily change the debug mode trigger, as well as run common code for all debug breaks, all maintained centrally.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform