Forum OpenACS Q&A: Better Debugging Tools
tests, I find that it would be nice to have some debugging tools. Of
course our first line of defense is to look at the server logs.
What I have in mind is the ability to put debug output either as a
comment in the HTML page returned by the server or as something
visible on the users browser using <pre> tags. For example suppose I
wanted to debug insert.tcl and wanted to know what sql statements were
beening sent to the database. I would be able to have the server
insert comments in the returned page each time the ns_db routine was
called from within insert.tcl.
Those comments would include a printout of the parameters of the ns_db
call and the line number in the source code. All this without
changing the code in insert.tcl.
Perhaps from a admin page one could determine which routines were to
be debugged and what IP address the requesting browser is at. Only
when these routines were called from that particular IP address would
the server insert debug output into the returned page.
Does anyone know whether such a capability already exists? If not how
would you go about creating it?