Forum OpenACS Q&A: Better Debugging Tools

Request notifications

Posted by Ken Chakiris on
As I explore the ACS/pg system, in particular doing the acceptance
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?

Posted by Ben Adida on
What you describe is pretty much what AOLserver 2.x used to have. I miss this very much. Let's poke the AOL guys on this one.