Turning debugging Message comments on and off
Elon Close
erclose at dakotacom.net
Sun Feb 24 22:45:09 PST 2008
Using a global variable is nice way to turn on and off a number or
scattered debug messages.
However, I personally tend to put into procedures local debugging
messages that are specific to the procedure and would find in those
cases a global on and off sort of a pain. The debug messages can be
hard to find, if simply put in. So I append to them a comment with,
for example $$$, and when I search for the $$$ I can find the debug
messages. Somewhat elementary and maybe simplistic, but a little
extra typing and I can easily find only the debug messages and remove
them, or comment them out.
Elon Close
On Feb 24, 2008, at 10:25 AM, Scott Corbett wrote:
> Robert,
>
> I recall someone writing a few years ago about a neat way to do this.
>
> In the .Initialize procedure, set a variable such as DebugVar ="On" or
> "Off"
>
> then, for each message do something like this:
>
> If DebugVar="On"
> Message "Give me the news"
> endif
>
> By changing only one variable value you can turn on and off all debug
> messages.
>
> Scott
>
>
> On Feb 24, 2008, at 10:48 AM, Robert Ameeti wrote:
>
>> I sprinkle Message commands throughout my code at times in an effort
>> to track down problems during coding. After I am through debugging, I
>> then comment out my Message commands so as to not have the user
>> having to react to the debug messages. Sometimes I do not notice a
>> Message command and have overlooked the need to comment it out but
>> the user later runs into that odd area of the code and voila, they
>> see it.
>>
>> Does anyone have any trick for easily turning off (and on) all
>> Message commands that they've used for debugging? The problem comes
>> about in that obviously there will be some Message commands that we
>> do need for the user.
>> --
>>
>> <><><><><><><><><><><><><><><><><><>
>> Robert Ameeti
>>
>> I read somewhere that 77 per cent of all the mentally ill live in
>> poverty. Actually, I'm more intrigued by the 23 per cent who are
>> apparently doing quite well for themselves.
>> - Emo Philips
>> <><><><><><><><><><><><><><><><><><>
>> _______________________________________________
>> Qna mailing list
>> Qna at provue.com
>> http://provue.com/mailman/listinfo/qna
>>
>
> _______________________________________________
> Qna mailing list
> Qna at provue.com
> http://provue.com/mailman/listinfo/qna
More information about the Qna
mailing list