Re: Feature Request: Hide debugging code.



On Tue, 27 Nov 2007 05:54:08 +0100, "Skybuck Flying"
<spam@xxxxxxxxxxx> wrote:

It could be handy if this code could be marked as "debug code" and then it
would be more handy if it could be "hidden".

I'd be worried about hiding in-line code as it would be too easy for
me to forget about it and miss something. So, if we ignore this
requirement (just for the sake of suggesting a completely different
strategy)...

This way once the programmer is done writing some debugging code it can be
hidden away.. so the programmer can focus on the real code.

...and look at what might happen in the field.

A customer has bought your application and calls to report a problem.
You think it's a bug but you need more information than "it crashes
all the time". What can you do because with certain issues (e.g.
hardware vs software DEP), you may be unable to reproduce locally.
Even VNCing in may not be that helpful.

You'd likely have to send them a special debug version with the debug
code enabled with the methods previously mentioned.

In common with many major applications, what I do is to have a user
selectable option to write log files. When this happens, all
user-readable status messages and error messages are also output to
the log file with line time stamps. By doing this, you can see what
the user did and when and what went wrong and where. I do wrap a lot
of my procedures in try..except constructs and raise exceptions rather
than produce message boxes to ensure fine grained error messages are
produced and program control maintained. I've found this discipline to
be massively useful as it self documents the code (via status texts)
and allows rapid debugging during development as well as some peace of
mind when deploying an application to the public.

Ok, I use logging on or off but there's no reason why you cannot use
more fine grained logging (e.g. file system logging, memory use
logging etc) if you wish.

If you think this is slow and cumbersome, it's not. Even if it was,
I'd just get a faster PC!

--
Z
.



Relevant Pages

  • Re: Solaris 10 CDE login problem - The DT messaging system could not be started
    ... Can anyone tell me exactly how to turn on a logging level that would ... It takes about 4 or 5 minutes for CDE to come up with the ... 4.Check to see any magic cookie related error messages in these ... | This happens when the tool-talk databases get corrupted. ...
    (comp.unix.solaris)
  • Re: Requiring specific computer to log on
    ... > Monitoring through the RRAS VPN log files is simple though. ... Double click the logfile. ... >> if I can simply block his own machine from logging on - that does resolve ... >> able to monitor his logging on. ...
    (microsoft.public.windows.server.sbs)
  • Re: GP Software Install / Log File
    ... I enabled the MSI logging also. ... the Windows Group Policy Guide is out from Microsoft Press!!! ... can also enable software installation specific logging. ... out where the log files go for this push. ...
    (microsoft.public.windows.group_policy)
  • Re: Requiring specific computer to log on
    ... Monitoring through the RRAS VPN log files is simple though. ... Access logging. ... Double click the logfile. ... to monitor compliance may be enough to have everyone play by the rules. ...
    (microsoft.public.windows.server.sbs)
  • RE: event id 7034 from Service Control Manager
    ... By default the following crash log files will be created: ... - If logging is turned on, the service copies all of the log files into the ... Microsoft Online Partner Support ... If you are outside the United States, ...
    (microsoft.public.sms.admin)