General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only