source: trunk/tkcon/docs/idebug.html @ 931

Last change on this file since 931 was 931, checked in by toby, 11 years ago

include rest of files

File size: 4.7 KB
Line 
1<HTML>
2<HEAD>
3<TITLE>tkcon: idebug procedure</TITLE>
4<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css">
5</HEAD>
6
7<BODY BGCOLOR=#FFFFFF>
8
9<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD>
10<!-- start header info -->
11<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF>
12<TR>
13<TH><FONT SIZE=+3>tkcon: <CODE>idebug</CODE> procedure</FONT></TH>
14<TD align=right>
15<A href="http://tkcon.sourceforge.net/"> 
16<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88"
17height="31" border="0" alt="SourceForge Logo"></A>
18</TD>
19</TR>
20</TABLE>
21<!-- end header info -->
22
23</TD></TR><TR><TD>
24<!-- start main navigation table -->
25<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%>
26<TR>
27<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH>
28<TH><A HREF="purpose.html">Purpose &amp; Features</A></TH>
29<TH><A HREF="limits.html">Limitations</A></TH>
30<TH><A HREF="todo.html">To&nbsp;Do</A></TH>
31<TH><A HREF="license.terms">License</A></TH>
32</TR><TR>
33<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A>
34(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH>
35<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH>
36</TR>
37</TABLE>
38<!-- end main navigation table -->
39</TD></TR><TR><TD>
40<!-- start secondary navigation table -->
41<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%>
42<TR>
43<TH><A HREF="start.html">Getting Started</A></TH>
44<TH><A HREF="bindings.html">Special Bindings</A></TH>
45<TH><A HREF="procs.html">Procedures</A></TH>
46<TH><A HREF="demopic.gif">Screenshot</A></TH>
47</TR>
48<TR>
49<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH>
50<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH>
51<TH CLASS="hi2"><A HREF="idebug.html" CLASS="hi2"><CODE>idebug</CODE></A></TH>
52<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH>
53</TR>
54</TABLE>
55<!-- end secondary navigation table -->
56</TD></TR><TR><TD BGCOLOR=#FFFFFF>
57<DIV CLASS="indent">
58 <P>
59The <B>idebug</B> command provides an interactive debugging environment for
60procedures via TkCon.  You can place <code>idebug break</code> commands
61into your procedure to create breakpoints.  It will pop up the TkCon
62console and put you into a "debugging" mode.  The <code>body, show &amp;
63trace</code> methods are intended for internal use only.
64 <P>
65
66This procedure works for minimal debugging sessions.  Comments are
67encouraged.
68
69<DL>
70
71<DT> <CODE>idebug <b>body</b></CODE> <I>?level?</I>
72<DD> Prints out the body of the command (if it is a procedure) at the
73specified level.  <i>level</i> defaults to the current level.
74
75<DT> <CODE>idebug <b>break</b></CODE> <I>?id?</I>
76<DD> Creates a breakpoint within a procedure.  This will only trigger if
77idebug is on and the id matches the pattern.  If so, TkCon will pop to the
78front with the prompt changed to an idebug prompt.  You are given the basic
79ability to observe the call stack an query/set variables or execute Tcl
80commands at any level.  A separate history is maintained in debugging mode.
81To see the special commands available at the debug prompt, type <B>?</B>
82and hit return.
83
84<DT> <CODE>idebug {echo ?id?}</CODE> <I>?args?</I>
85<DD> Behaves just like <code>echo</code>, but only triggers when idebug is
86on.  You can specify an optional id to further restrict triggering.  If no
87id is specified, it defaults to the name of the command in which the call
88was made.
89
90<DT> <CODE>idebug <b>id</b></CODE> <I>?id?</I>
91<DD> Query or set the idebug id.  This id is used by other idebug methods
92to determine if they should trigger or not.  The idebug id can be a glob
93pattern and defaults to *.
94
95<DT> <CODE>idebug <b>off</b></CODE>
96<DD> Turns idebug off.
97
98<DT> <CODE>idebug <b>on</b></CODE> <I>?id?</I>
99<DD> Turns idebug on.  If <i>id</i> is specified, it sets the id to it.
100
101<DT> <CODE>idebug {puts ?id?}</CODE> <I>args</I>
102<DD> Behaves just like <code>puts</code>, but only triggers when idebug is
103on.  You can specify an optional id to further restrict triggering.  If no
104id is specified, it defaults to the name of the command in which the call
105was made.
106
107<DT> <CODE>idebug <b>show</b></CODE> <I>type ?level? ?VERBOSE?</I>
108<DD> <i>type</i> must be one of vars, locals or globals.  This method
109will output the variables/locals/globals present in a particular level.
110If VERBOSE is added, then it actually 'dump's out the values as well.
111<i>level</i> defaults to the level in which this method was called.
112
113<DT> <CODE>idebug <b>trace</b></CODE> <I>?level?</I>
114<DD> Prints out the stack trace from the specified level up to the top
115level.  <i>level</i> defaults to the current level.
116
117</DL>
118</DIV>
119</TD></TR></TABLE>
120
121<HR NOSHADE SIZE=1>
122<ADDRESS><FONT SIZE=2>&copy;
123<A HREF="mailto:jeff.hobbs@acm.org">Jeffrey Hobbs</A></FONT></ADDRESS>
124
125</BODY>
126</HTML>
Note: See TracBrowser for help on using the repository browser.