1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
[mypage::header "Tcl Server Info"]
<h3>Status</h3>
[StatusMenu]
<h3>Debugging</h3>
<p>
This server has the interesting ability to reload parts of its implementation
dynamically. This lets you add features and fix bugs without ever
restarting.
It is even possible to setup a debug session with TclPro.
This is made possible with the help of the /debug URL. The debug module
has e.g. several useful URLs that let you examine variable values and other internal state.
<br><br>
The /debug URLs are:
<br><br>
/debug/source?source=<value>&thread=<value>
<br><br>
/debug/package?package=<value>
<br><br>
/debug/pvalue?aname=<value>
<br><br>
/debug/parray?aname=<value>
<br><br>
/debug/raise?args
<br><br>
/debug/after
<br><br>
/debug/echo?title=<value>&args
<br><br>
/debug/errorInfo?title=<value>&errorInfo=<value>&no=<value>
<br><br>
/debug/dbg?host=<value>&port=<value>
<br><br>
/debug/showproc?showproc=<value>
<br><br>
/debug/disable
<br><br>
For more specific information about the calls see the debug module.
<p>
Some examples:
<p>
<form action=/debug/source method=post>
<input type="submit" name="submit" value="Reload Source"><input type="text" name="source">
</form>
<p>
<form action=/debug/pvalue method=post>
<input type="submit" name="submit" value="Print Value"><input type="text" name="aname">
</form>
<p>
<form action=/debug/showproc method=post>
<input type="submit" name="submit" value="Show Proc"><input type="text" name="proc">
</form>
<p>
<h3>TclPro</h3>
It is also possible to debug tclhttpd with TclPro.
Briefly you have to perform following steps:
<br>
Enable the tclhttpd server for debugging (see httpdthread.tcl).
<br>
Setup a Project in TclPro with Debugging Type "Remote Debugging";
define the portnumber; start TclPro by calling
<br><br>
http://yourserver:port/debug/dbg?host=<hostname>&port=<portnumber>
<br><br>
The tclhttpd server will connect to a TclPro Session running on host <hostname>
listening for remote connections on port number <portnumber>
<br>
In case TclPro is running on the "localhost" listening for the default portnumber "2576"
it is enough to call
<br><br>
http://yourserver:port/debug/dbg
[mypage::footer]
|