I’m betting that there is a smarter way to do what I’m doing.
When I am debugging a long procedure, I used to include a lot of Messges. When I was wanting to not display them, I commented them out. Then I could later turn them on again as necessary.
I then later created a Debug mode and checked to see if I was in Debug mode and only displayed the messages when needed.
Then I later recognized that I really needed to sometimes Stop the procedure when I saw that it had gone off the rails and needed to alter the code. What I have at the moment is a lot of code that really should not be necessary to have the opportunity to be in debug mode and see certain values or stop a procedure. This is what I have lots and lots of time in a procedure.
Local LDebugMode AlertYesNo "Are you in debug mode?" If Info("DialogTrigger")="Yes" LDebugMode="Yes" Else LDebugMode="No" EndIf If LDebugMode="Yes" Alert "Continue,Exit Debug Mode,Stop Procedure" FGBoatVSailsCriteria + ": Boat V Sails= " + Info("Selected") If Info("DialogTrigger")="Stop Procedure" Stop ElseIf Info("DialogTrigger") = "Exit Debug Mode" LDebugMode = "No" EndIf EndIf
Is there an easier way to accomplish what I think every programmer needs or would like to do?