Aaron Ucko has lately implemented new built-in features designed to ease the pain of debugging [Fast-]CGI applications. The online docs: http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/programming_manual/cgi_diag.html