debug statement becomes a breakpoint that can't be turned off - OI Specific (OpenInsight 32-bit Specific)
At 19 JAN 2003 04:18:10PM Oystein Reigem wrote:
The debug statement starts the Debugger. But it also doubles as a breakpoint - one that can't be toggled off!!! This can be quite a nuisance sometimes, when the debug statement is contained in a loop. The execution breaks each time the debug statement is encountered.
Now I got the idea one could work around the problem by programming like
if the Debugger is running then debug endBut how can a program detect if the Debugger is running? I might be able to detect it if I knew its class name, but I don't.
- Oystein -
At 19 JAN 2003 04:44PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
DebugFrame32
World Leaders in all things RevSoft
At 19 JAN 2003 04:53PM Mike Ruane wrote:
Oy-
How about something simple, like:
debug_flag=1
loop
until
if debug_flag then debugrepeat
this will let you run it initially, and toggle off as needed. You can reinitialize later in the program as needed.
Mike
At 20 JAN 2003 06:01AM Oystein Reigem wrote:
Mike - thank you for the idea. With some modifications it might suit my needs. I don't know yet.
Sprezz - thanks.
- Oystein -
At 01 FEB 2003 07:25AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
I do the same, but have the debug_flag in a common, then another program that's something like
Subroutine DebugFlag( Flag )
Common /%DEBUGFLAG%%/ DebugFlag
DebugFLag=Flag
Return
So, in the programs, insert the common then just use
If DebugFlag then debug, and you can set it at whim from the system editor before executing the program.
All in all, same idea…
World Leaders in all Things RevSoft