So far this is the best I can come up with. Use the following command to redefine a Tcl proc to do remote debugging. JAC
Ideally I'd like to be able to instrument all the code so that I can easily set breakpoints and step through better. The problem lies in the way AOLserver handles its threads. There is a single master thread that does the original sourcing of all your code. Then each connection thread introspects the master thread for its code. So the connection threads never call the source command like the master thread did. This prevents TDK from instrumenting in a nice way.
The simple procedure below will at least let you debug a single page at a time when it's turned on.
# TclPro Debugging # proc dproc { names args_list body } { proc $names $args_list [subst -nocommands { debugger_init return [debugger_eval { $body }] }] }
This information was posted by Nathan Folkman to the AOLServer list on 2006-09-06:
Debugging AOLserver pages
ns_section "ns/server/server1/adp" ns_param enabledebug true
% tcldebugger &
File > New-Project
Debugging Type > Remote Debugging
?debug=<debug>&dhost=<dhost>&dport=<dport>&dprocs=<dprocs>
debug String. The files you wish to debug. (Example: *, *.adp, foo.inc) dhost String. The host name the Tcl debugger is listening on. (Example: 127.0.0.1) dport Integer. The port the Tcl debugger is listening on. (Example: 2576) dprocs String. Procedures to instrument. (Example: ns*, foo_something)
http://foo.com:8000/test.adp?debug=*&dhost=127.0.0.1&dport=2576 <http://foo.com:8000/test.adp?debug=*&dhost=127.0.0.1&dport=2576>