Debugging ADPs with TclPro

From AOLserver Wiki
Revision as of 17:24, 27 May 2004 by WikiSysop (talk | contribs) (imported from WiKit id 827)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

[ Taken from http://www.tcl.tk/man/aolserver3.0/tadp-ch6.htm and is likely to be very out of date at this point. ]

To debug your ADPs with TclPro, follow these steps:

Download and install TclPro from http://www.scriptics.com/tclpro/. Temporary licenses are available.

Copy the prodebug.tcl file from the TclPro distribution to the modules/tcl directory.

Set the EnableDebug parameter in the ns/server/server-name/adp section of the configuration file to On.

Run TclPro and start a "remote project", which puts TclPro into a mode waiting for AOLserver to connect.

Open an ADP file with the ?debug=<pattern> query string in addition to any other query data you may send. AOLserver will then trap on ADP files matching the pattern. For example, you can just use debug=*.adp to trap all files, or you can use debug=someinclude.inc file to trap in an included file.

To set a breakpoint in a procedure you'll have to "instrument" the procedure either after the debugger traps the first time or with the "dproc=<pattern>" query argument.