> I've been given the task of coming up with a standard for our
> new app for help in debugging the code when a client calls in
> and has a problem. So far, all I can think of is to log all
> variable values at the beggening of all functions and logging
> the output of all functions. Also logging all screen data
> (if grid, only current row).
>
> Questions:
>
> 1) What have you done in the past to help debugging?
>
> 2) Is there a better way then my idea above?
Yes, look into trace switches and listeners. You can make life easier
with a library like Log4Net for example which has a
lot of different fine grained trace listeners on board. The main thing is that
trace switches can be turned on or off with a .config
file, and the output receiver can also be configured in the config file. This
means that you don't have to recompile a build for
your customer to enable logging of data at runtime.
Enabling tracing is very simple, the .NET documentation has a lot of
info on this (tracing, trace listeners, trace
switches). Also log4net has extra documentation if you want to use log4net for
this (you can use the default .NET build in tracing)
Frans
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com