• Looking for a way to disable functions while debugging...

    By Peter Narlund 1 decade ago

    As hinted in the project about page "automatically disabling the progress bar when in debug mode" is something that I'm curious about.



    Do you have any ideas about how to find out if an agent is running in debug mode?



    /Peter Närlund

    • By Andre Guirard 1 decade ago

      The only way I know is by timing – put a Stop statement in your code, and use the Timer function to see how much time elapsed during the execution of that statement. If it's more than a hundredth of a second, I think you can assume the debugger is active.

      • By Lars Berntrop 1 year ago

        The way I implement this is having it checked it ONCE when the first LotusScript application initialization happens, and set the global Integer noDebug published by the global error reporting library that is used throughout the code.
        Additionally, almost any error handler installing code is coded thus:

        If noDebug Then On Error Goto bublUp
        

        noDebug is set to True in the init routine, False if the LotusScript debugger is active. So then when an error happens, the Debugger window pops up instead of the error handler being called.