[wingide-users] Word completion and refactoring support
sdeibel at wingware.com
Wed Jul 4 07:58:29 MDT 2007
Geoff Bache wrote:
> "As a personal choice, we tend not to use debuggers beyond getting a
> stack trace or the value of a variable or two. One reason is that it is
> easy to get lost in details of complicated data structures and control
> flow; we find stepping through a program less productive than thinking
> harder and adding output statements and self-checking code at critical
> places. Clicking over statements takes longer than scanning the output
> of judiciously-placed displays. It takes less time to decide where to
> put print statements than to single-step to the critical section of
> code, even assuming we know where that is. More important, debugging
> statements stay with the program; debugger sessions are transient."
It takes even less time to figure out where to put a breakpoint
_instead_ of a print statement and use the debugger to access the
values you would have printed (or any that you might not have thought
to print but turn out relevant). This is a big reason why Wing Pro
has the Debug Probe. Another reason is you can immediately try out
your proposed fix within the context of the problem. I find this
approach is extremely effective in code I don't know well. It
works even better in Wing 3.0 where you get auto-completion so you
can easily guess at attribute/method names.
I never understood why logging and debugging is supposed to be mutually
exclusive. We do both in Wing -- a user may get a traceback in their
log, send it to us, then I set a breakpoint or conditional breakpoint
to look around at the program state when it's not immediately obvious
what went wrong.
Ditto with unit testing -- the point of that is to make sure all
your code gets exercised and does what it should. When it doesn't
work properly, a debugger can be used to figure out why.
There is no silver bullet in software development. All of these
things (and many I didn't mention) have their place and can be
used together. I'd go so far as to say "Methodological purism
found to be harmful" ;-).
More information about the wingide-users