httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mads Toftum <>
Subject Re: Testing & debugging?
Date Sun, 06 May 2007 09:18:47 GMT
On Sat, May 05, 2007 at 10:03:24PM -0700, Tim Bray wrote:
> I'd be so much happier if I had unit tests, but it's tricky since  
> everything's static.  My best idea is to have an #ifdef TESTING  
> section in my code that has a main() in it that runs the tests (of  
> course this means actually *understanding* the lovely makefile  
> goodness I copied from Josh Rotenberg so I can produce a standalone  
> runnable).  Anyone have a better idea?
Apart from the testing framework that someone else mentioned, it is
pretty common to tie debugging info from a module to the debug loglevel
rather than a #define.

> Until I figure out the above, I'm going to be debugging more than one  
> would really want.  Back when I was writing modules for Apache 1.* I  
> got things wired up so I could debug in Emacs... that still about the  
> state of the art?  -Tim

Pretty much, unless you're lucky enough to be on solaris and have dtrace
where you could instrument httpd - along the lines of mod dtrace:


Mads Toftum

View raw message