> Do you develop with an xterm tailing the logs, an emacs 
> window (or other
> editor) to edit the script and/or the packages (and on some occassions
> httpd.conf), and a web browser (on an alternate virtual 
> desktop)?  

Bingo. :-)

Do you
> pepper code with :
> 
> print "option:" . $option{$foo . "<br>" if $debug;

If it's a longer-term debugging option that I might want again later then I
might make a debug() method where I'll do 
debug('this worked ok') and the debug() method might examine a flag to see
whether it should do anything with that message.  
Or a log() method that recognizes various levels of messages and obeys a
debug_level setting or something.  I once used a Java package (the name
escapes me but it was probably something simple like jLog) that worked sort
of this way, though it also had some xml config files and such... anyways,
I'm sure there are plenty of perl modules to do something similar, but the
debug() is a fairly effective 2 minute alternative.  If's it just a quick
one-time debug, I'll typically just use a warn or similar.  

> 
> Fairly low tech, huh.
> 
> At apachecon, a speaker (who neither bragged nor rambled) 
> mentioned lwp
> use instead of (or to complement) the web browser portion.
> 
> Will the use of lwp instead of a browser improve my coding 
> ability (either
> in terms of speed or just improving my perl coding)?  Seems 
> like I'd have
> to spend too much time with the lwp script (tell it to first 
> request the
> page then choose option A and B then hit the "submit" button ... )

This sounds more like a testing suite than regular old
debugging-while-you-go.  Probably a place for both.

> 
> Is there some way to improve this cycle : edit code -> 
> refresh browser ->
> possibly look at the error log -> edit code -> ...

Honestly, this method has always been very efficient for us and most of the
time we don't need anything more sophisticated for devel/debug.  Now for
more formal testing, that gets trickier for us and we're currently looking
for a good way to build some automated tests of our code and our web
interface without it getting too unwieldy.  This will probably be where we
spend a lot of time in the first part of the year.  Maybe LWP will be handy
here.

-Fran 

Reply via email to