1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
---|
2 | |
---|
3 | <html> |
---|
4 | |
---|
5 | <head> |
---|
6 | <title>J User's Guide - Debugger Commands</title> |
---|
7 | <LINK REL="stylesheet" HREF="j.css" TYPE="text/css"> |
---|
8 | </head> |
---|
9 | |
---|
10 | <body link=blue vlink=blue> |
---|
11 | |
---|
12 | <a href="contents.html">Top</a> |
---|
13 | |
---|
14 | <hr> |
---|
15 | |
---|
16 | <h1>Debugger Commands</h1> |
---|
17 | |
---|
18 | <hr> |
---|
19 | <p> |
---|
20 | The commands described here may be used in the "Command" textfield of the |
---|
21 | debugger control dialog. The debugger must actually be running first; use Alt X, |
---|
22 | <a href="commands.html#jdb">jdb</a>, without any arguments, to start it. |
---|
23 | <p> |
---|
24 | If you're working in an editor source window, you can use Alt X, "jdb |
---|
25 | [command]" to send a command to the running instance of the debugger (for |
---|
26 | example, Alt X, "jdb continue", or Alt X, "jdb restart"). Several frequently |
---|
27 | used debugger commands are also available on the right-button context menu in |
---|
28 | Java source buffers. |
---|
29 | <p> |
---|
30 | Any command may be shortened to the first few letters of its name, as long as |
---|
31 | the abbreviation is unambiguous. |
---|
32 | <p> |
---|
33 | Certain frequently used commands may be invoked with their first letter, even |
---|
34 | if there are other commands that start with the same letter (e.g. |
---|
35 | <a href="jdbcommands.html#continue">continue</a>, |
---|
36 | <a href="jdbcommands.html#step">step</a>). |
---|
37 | <p> |
---|
38 | The <a href="jdbcommands.html#continue">continue</a>, |
---|
39 | <a href="jdbcommand.html#next">next</a> and |
---|
40 | <a href="jdbcommands.html#step">step</a> commands may be repeated by just |
---|
41 | pressing Enter in the "Command" textfield. |
---|
42 | |
---|
43 | <ul> |
---|
44 | <li><a href="jdbcommands.html#break">break</a>, <a href="jdbcommands.html#break">b</a></li> |
---|
45 | <li><a href="jdbcommands.html#clear">clear</a></li> |
---|
46 | <li><a href="jdbcommands.html#clearall">clear all</a></li> |
---|
47 | <li><a href="jdbcommands.html#continue">continue</a>, <a href="jdbcommands.html#continue">c</a></li> |
---|
48 | <li><a href="jdbcommands.html#finish">finish</a>, <a href="jdbcommands.html#finish">f</a></li> |
---|
49 | <li><a href="jdbcommands.html#go">go</a></li> |
---|
50 | <li><a href="jdbcommands.html#locals">locals</a></li> |
---|
51 | <li><a href="jdbcommands.html#next">next</a>, <a href="jdbcommands.html#next">n</a></li> |
---|
52 | <li><a href="jdbcommands.html#print">print</a>, <a href="jdbcommands.html#print">p</a></li> |
---|
53 | <li><a href="jdbcommands.html#quit">quit</a>, <a href="jdbcommands.html#quit">q</a></li> |
---|
54 | <li><a href="jdbcommands.html#resume">resume</a></li> |
---|
55 | <li><a href="jdbcommands.html#stdin">stdin</a></li> |
---|
56 | <li><a href="jdbcommands.html#step">step</a>, <a href="jdbcommands.html#step">s</a></li> |
---|
57 | <li><a href="jdbcommands.html#stepout">step out</a></li> |
---|
58 | <li><a href="jdbcommands.html#stop">stop</a></li> |
---|
59 | <li><a href="jdbcommands.html#suspend">suspend</a></li> |
---|
60 | <li><a href="jdbcommands.html#tbreak">tbreak</a></li> |
---|
61 | </ul> |
---|
62 | |
---|
63 | <a name="break">break</a><dl><dd> |
---|
64 | <p> |
---|
65 | Sets a breakpoint. |
---|
66 | <p> |
---|
67 | <b>Syntax:</b> |
---|
68 | <pre> |
---|
69 | break <i>filename:linenumber</i> |
---|
70 | break <i>class.method</i></pre> |
---|
71 | <b>Examples:</b> |
---|
72 | <pre> |
---|
73 | b Lisp.java:138 |
---|
74 | b org.armedbear.lisp.Main.main</pre> |
---|
75 | <p> |
---|
76 | <b>Aliases:</b> <a href="#stop">stop</a> |
---|
77 | <p> |
---|
78 | <b>Abbreviation:</b> b |
---|
79 | </dl> |
---|
80 | |
---|
81 | <a name="clear">clear</a><dl><dd> |
---|
82 | <p> |
---|
83 | Clears a breakpoint. |
---|
84 | <p> |
---|
85 | <b>Syntax:</b> |
---|
86 | <pre> |
---|
87 | clear <i>filename:linenumber</i> |
---|
88 | clear <i>class.method</i></pre> |
---|
89 | <b>Example:</b> |
---|
90 | <pre> |
---|
91 | clear Lisp.java:138</pre> |
---|
92 | </dl> |
---|
93 | |
---|
94 | <a name="clearall">clear all</a><dl><dd> |
---|
95 | <p> |
---|
96 | Clears all breakpoints. |
---|
97 | </dl> |
---|
98 | |
---|
99 | <a name="continue">continue</a><dl><dd> |
---|
100 | <p> |
---|
101 | Resumes execution at the address where the program last stopped. |
---|
102 | <p> |
---|
103 | <b>Aliases:</b> <a href="#go">go</a>, <a href="#resume">resume</a> |
---|
104 | <p> |
---|
105 | <b>Abbreviation:</b> c |
---|
106 | </dl> |
---|
107 | |
---|
108 | <a name="finish">finish</a><dl><dd> |
---|
109 | <p> |
---|
110 | Continues execution until just after the current method returns. |
---|
111 | <p> |
---|
112 | <b>Aliases:</b> step out |
---|
113 | <p> |
---|
114 | <b>Abbreviation:</b> f |
---|
115 | </dl> |
---|
116 | |
---|
117 | <a name="go">go</a><dl><dd> |
---|
118 | <p> |
---|
119 | Resumes execution at the address where the program last stopped. |
---|
120 | <p> |
---|
121 | <b>Alias for:</b> <a href="#continue">continue</a> |
---|
122 | </dl> |
---|
123 | |
---|
124 | <a name="locals">locals</a><dl><dd> |
---|
125 | <p> |
---|
126 | Displays values for all of the local variables in the current stack frame. |
---|
127 | <p> |
---|
128 | <b>Aliases:</b> None |
---|
129 | </dl> |
---|
130 | |
---|
131 | <a name="next">next</a><dl><dd> |
---|
132 | <p> |
---|
133 | Executes the current line of code, stepping over method calls. |
---|
134 | <p> |
---|
135 | <b>Syntax:</b> |
---|
136 | <pre> |
---|
137 | next |
---|
138 | next <i>count</i></pre> |
---|
139 | <b>Examples:</b> |
---|
140 | <pre> |
---|
141 | n |
---|
142 | n 5</pre> |
---|
143 | <p> |
---|
144 | <b>Aliases:</b> None |
---|
145 | <p> |
---|
146 | <b>Abbreviation:</b> n |
---|
147 | </dl> |
---|
148 | |
---|
149 | <a name="print">print</a><dl><dd> |
---|
150 | <p> |
---|
151 | Prints the value of a variable. |
---|
152 | <p> |
---|
153 | <b>Syntax:</b> |
---|
154 | <pre> |
---|
155 | print <i>expr</i></pre> |
---|
156 | <b>Examples:</b> |
---|
157 | <pre> |
---|
158 | p foo |
---|
159 | p foo.bar</pre> |
---|
160 | <p> |
---|
161 | <b>Aliases:</b> None |
---|
162 | <p> |
---|
163 | <b>Abbreviation:</b> p |
---|
164 | </dl> |
---|
165 | |
---|
166 | <a name="quit">quit</a><dl><dd> |
---|
167 | <p> |
---|
168 | Terminates the debugger, closes the control dialog and kills the transcript |
---|
169 | buffer. (If you want to keep the transcript, copy it somewhere before quitting.) |
---|
170 | <p> |
---|
171 | <b>Aliases:</b> None |
---|
172 | <p> |
---|
173 | <b>Abbreviation:</b> q |
---|
174 | </dl> |
---|
175 | |
---|
176 | <a name="resume">resume</a><dl><dd> |
---|
177 | <p> |
---|
178 | Resumes execution at the address where the program last stopped. |
---|
179 | <p> |
---|
180 | <b>Alias for:</b> <a href="#continue">continue</a> |
---|
181 | </dl> |
---|
182 | |
---|
183 | <a name="stdin">stdin</a><dl><dd> |
---|
184 | <p> |
---|
185 | Sends argument to stdin of debuggee. |
---|
186 | <p> |
---|
187 | <b>Syntax:</b> |
---|
188 | <pre> |
---|
189 | stdin <i>string</i></pre> |
---|
190 | <b>Examples:</b> |
---|
191 | <pre> |
---|
192 | stdin (+ 1 2)</pre> |
---|
193 | <p> |
---|
194 | <b>Aliases:</b> None |
---|
195 | </dl> |
---|
196 | |
---|
197 | <a name="step">step</a><dl><dd> |
---|
198 | <p> |
---|
199 | Executes the current line of code, stepping into any method calls it may |
---|
200 | contain. |
---|
201 | <p> |
---|
202 | <b>Syntax:</b> |
---|
203 | <pre> |
---|
204 | step |
---|
205 | step <i>count</i></pre> |
---|
206 | <b>Examples:</b> |
---|
207 | <pre> |
---|
208 | s |
---|
209 | s 3</pre> |
---|
210 | <p> |
---|
211 | <b>Aliases:</b> None |
---|
212 | <p> |
---|
213 | <b>Abbreviation:</b> s |
---|
214 | </dl> |
---|
215 | |
---|
216 | <a name="stepout">step out</a><dl><dd> |
---|
217 | <p> |
---|
218 | Continues execution until just after the current method returns. |
---|
219 | <p> |
---|
220 | <b>Alias for:</b> <a href="#finish">finish</a> |
---|
221 | </dl> |
---|
222 | |
---|
223 | <a name="stop">stop</a><dl><dd> |
---|
224 | <p> |
---|
225 | Sets a breakpoint. |
---|
226 | <p> |
---|
227 | <b>Syntax:</b> |
---|
228 | <pre> |
---|
229 | stop <i>filename:linenumber</i> |
---|
230 | stop <i>class.method</i></pre> |
---|
231 | <b>Examples:</b> |
---|
232 | <pre> |
---|
233 | stop Lisp.java:138 |
---|
234 | stop org.armedbear.lisp.Main.main</pre> |
---|
235 | <p> |
---|
236 | <b>Alias for:</b> <a href="#break">break</a> |
---|
237 | </dl> |
---|
238 | |
---|
239 | <a name="suspend">suspend</a><dl><dd> |
---|
240 | <p> |
---|
241 | Suspends execution of the application. |
---|
242 | <p> |
---|
243 | <b>Aliases:</b> None |
---|
244 | </dl> |
---|
245 | |
---|
246 | <a name="tbreak">tbreak</a><dl><dd> |
---|
247 | <p> |
---|
248 | Sets a temporary breakpoint. |
---|
249 | <p> |
---|
250 | <b>Syntax:</b> |
---|
251 | <pre> |
---|
252 | tbreak <i>filename:linenumber</i> |
---|
253 | tbreak <i>class.method</i></pre> |
---|
254 | <b>Examples:</b> |
---|
255 | <pre> |
---|
256 | tbreak Lisp.java:138 |
---|
257 | tbreak org.armedbear.lisp.Main.main</pre> |
---|
258 | <p> |
---|
259 | <b>Aliases:</b> None |
---|
260 | </dl> |
---|
261 | |
---|
262 | |
---|
263 | </body> |
---|
264 | |
---|
265 | </html> |
---|