Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debug mode
Message
From
22/02/1998 10:08:46
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00080304
Message ID:
00080325
Views:
27
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform