in reply to No output from CGI script when using CGI::Debug

I think it might be because you are printing the content header manually, and not using the CGI.pm methods such as:
print header; print start_html;