eric6/Documentation/Source/eric6.DebugClients.Python.DebugBase.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7707
6abcf4275d0e
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.DebugClients.Python.DebugBase</h1> 23 <h1>eric6.DebugClients.Python.DebugBase</h1>
24
23 <p> 25 <p>
24 Module implementing the debug base class which based originally on bdb. 26 Module implementing the debug base class which based originally on bdb.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>gRecursionLimit</td></tr> 31 <tr><td>gRecursionLimit</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
34
31 <table> 35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#DebugBase">DebugBase</a></td> 38 <td><a href="#DebugBase">DebugBase</a></td>
34 <td>Class implementing base class of the debugger.</td> 39 <td>Class implementing base class of the debugger.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
43
38 <table> 44 <table>
45
39 <tr> 46 <tr>
40 <td><a href="#printerr">printerr</a></td> 47 <td><a href="#printerr">printerr</a></td>
41 <td>Module function used for debugging the debug client.</td> 48 <td>Module function used for debugging the debug client.</td>
42 </tr><tr> 49 </tr>
50 <tr>
43 <td><a href="#setRecursionLimit">setRecursionLimit</a></td> 51 <td><a href="#setRecursionLimit">setRecursionLimit</a></td>
44 <td>Module function to set the recursion limit.</td> 52 <td>Module function to set the recursion limit.</td>
45 </tr> 53 </tr>
46 </table> 54 </table>
47 <hr /><hr /> 55 <hr />
56 <hr />
48 <a NAME="DebugBase" ID="DebugBase"></a> 57 <a NAME="DebugBase" ID="DebugBase"></a>
49 <h2>DebugBase</h2> 58 <h2>DebugBase</h2>
59
50 <p> 60 <p>
51 Class implementing base class of the debugger. 61 Class implementing base class of the debugger.
52 </p><p> 62 </p>
63 <p>
53 Provides methods for the 'owning' client to call to step etc. 64 Provides methods for the 'owning' client to call to step etc.
54 </p> 65 </p>
55 <h3>Derived from</h3> 66 <h3>Derived from</h3>
56 object 67 object
57 <h3>Class Attributes</h3> 68 <h3>Class Attributes</h3>
69
58 <table> 70 <table>
59 <tr><td>_fnCache</td></tr><tr><td>filesToSkip</td></tr><tr><td>lib</td></tr><tr><td>pathsToSkip</td></tr><tr><td>pollTimerEnabled</td></tr> 71 <tr><td>_fnCache</td></tr><tr><td>filesToSkip</td></tr><tr><td>lib</td></tr><tr><td>pathsToSkip</td></tr><tr><td>pollTimerEnabled</td></tr>
60 </table> 72 </table>
61 <h3>Class Methods</h3> 73 <h3>Class Methods</h3>
74
62 <table> 75 <table>
63 <tr><td>None</td></tr> 76 <tr><td>None</td></tr>
64 </table> 77 </table>
65 <h3>Methods</h3> 78 <h3>Methods</h3>
79
66 <table> 80 <table>
81
67 <tr> 82 <tr>
68 <td><a href="#DebugBase.__init__">DebugBase</a></td> 83 <td><a href="#DebugBase.__init__">DebugBase</a></td>
69 <td>Constructor</td> 84 <td>Constructor</td>
70 </tr><tr> 85 </tr>
86 <tr>
71 <td><a href="#DebugBase.__checkBreakInFrame">__checkBreakInFrame</a></td> 87 <td><a href="#DebugBase.__checkBreakInFrame">__checkBreakInFrame</a></td>
72 <td>Private method to check if the function / method has a line number which is a breakpoint.</td> 88 <td>Private method to check if the function / method has a line number which is a breakpoint.</td>
73 </tr><tr> 89 </tr>
90 <tr>
74 <td><a href="#DebugBase.__do_clearBreak">__do_clearBreak</a></td> 91 <td><a href="#DebugBase.__do_clearBreak">__do_clearBreak</a></td>
75 <td>Private method called to clear a temporary breakpoint.</td> 92 <td>Private method called to clear a temporary breakpoint.</td>
76 </tr><tr> 93 </tr>
94 <tr>
77 <td><a href="#DebugBase.__do_clearWatch">__do_clearWatch</a></td> 95 <td><a href="#DebugBase.__do_clearWatch">__do_clearWatch</a></td>
78 <td>Private method called to clear a temporary watch expression.</td> 96 <td>Private method called to clear a temporary watch expression.</td>
79 </tr><tr> 97 </tr>
98 <tr>
80 <td><a href="#DebugBase.__eventPollTimer">__eventPollTimer</a></td> 99 <td><a href="#DebugBase.__eventPollTimer">__eventPollTimer</a></td>
81 <td>Private method to set a flag every 0.5 s to check for new messages.</td> 100 <td>Private method to set a flag every 0.5 s to check for new messages.</td>
82 </tr><tr> 101 </tr>
102 <tr>
83 <td><a href="#DebugBase.__extractExceptionName">__extractExceptionName</a></td> 103 <td><a href="#DebugBase.__extractExceptionName">__extractExceptionName</a></td>
84 <td>Private method to extract the exception name given the exception type object.</td> 104 <td>Private method to extract the exception name given the exception type object.</td>
85 </tr><tr> 105 </tr>
106 <tr>
86 <td><a href="#DebugBase.__extractSystemExitMessage">__extractSystemExitMessage</a></td> 107 <td><a href="#DebugBase.__extractSystemExitMessage">__extractSystemExitMessage</a></td>
87 <td>Private method to get the SystemExit code and message.</td> 108 <td>Private method to get the SystemExit code and message.</td>
88 </tr><tr> 109 </tr>
110 <tr>
89 <td><a href="#DebugBase.__extract_stack">__extract_stack</a></td> 111 <td><a href="#DebugBase.__extract_stack">__extract_stack</a></td>
90 <td>Private member to return a list of stack frames.</td> 112 <td>Private member to return a list of stack frames.</td>
91 </tr><tr> 113 </tr>
114 <tr>
92 <td><a href="#DebugBase.__sendCallTrace">__sendCallTrace</a></td> 115 <td><a href="#DebugBase.__sendCallTrace">__sendCallTrace</a></td>
93 <td>Private method to send a call/return trace.</td> 116 <td>Private method to send a call/return trace.</td>
94 </tr><tr> 117 </tr>
118 <tr>
95 <td><a href="#DebugBase.__skipFrame">__skipFrame</a></td> 119 <td><a href="#DebugBase.__skipFrame">__skipFrame</a></td>
96 <td>Private method to filter out debugger files.</td> 120 <td>Private method to filter out debugger files.</td>
97 </tr><tr> 121 </tr>
122 <tr>
98 <td><a href="#DebugBase._set_stopinfo">_set_stopinfo</a></td> 123 <td><a href="#DebugBase._set_stopinfo">_set_stopinfo</a></td>
99 <td>Protected method to update the frame pointers.</td> 124 <td>Protected method to update the frame pointers.</td>
100 </tr><tr> 125 </tr>
126 <tr>
101 <td><a href="#DebugBase.bootstrap">bootstrap</a></td> 127 <td><a href="#DebugBase.bootstrap">bootstrap</a></td>
102 <td>Public method to bootstrap a thread.</td> 128 <td>Public method to bootstrap a thread.</td>
103 </tr><tr> 129 </tr>
130 <tr>
104 <td><a href="#DebugBase.break_here">break_here</a></td> 131 <td><a href="#DebugBase.break_here">break_here</a></td>
105 <td>Public method reimplemented from bdb.py to fix the filename from the frame.</td> 132 <td>Public method reimplemented from bdb.py to fix the filename from the frame.</td>
106 </tr><tr> 133 </tr>
134 <tr>
107 <td><a href="#DebugBase.fix_frame_filename">fix_frame_filename</a></td> 135 <td><a href="#DebugBase.fix_frame_filename">fix_frame_filename</a></td>
108 <td>Public method used to fixup the filename for a given frame.</td> 136 <td>Public method used to fixup the filename for a given frame.</td>
109 </tr><tr> 137 </tr>
138 <tr>
110 <td><a href="#DebugBase.getCurrentFrame">getCurrentFrame</a></td> 139 <td><a href="#DebugBase.getCurrentFrame">getCurrentFrame</a></td>
111 <td>Public method to return the current frame.</td> 140 <td>Public method to return the current frame.</td>
112 </tr><tr> 141 </tr>
142 <tr>
113 <td><a href="#DebugBase.getFrameLocals">getFrameLocals</a></td> 143 <td><a href="#DebugBase.getFrameLocals">getFrameLocals</a></td>
114 <td>Public method to return the locals dictionary of the current frame or a frame below.</td> 144 <td>Public method to return the locals dictionary of the current frame or a frame below.</td>
115 </tr><tr> 145 </tr>
146 <tr>
116 <td><a href="#DebugBase.getStack">getStack</a></td> 147 <td><a href="#DebugBase.getStack">getStack</a></td>
117 <td>Public method to get the stack.</td> 148 <td>Public method to get the stack.</td>
118 </tr><tr> 149 </tr>
150 <tr>
119 <td><a href="#DebugBase.go">go</a></td> 151 <td><a href="#DebugBase.go">go</a></td>
120 <td>Public method to resume the thread.</td> 152 <td>Public method to resume the thread.</td>
121 </tr><tr> 153 </tr>
154 <tr>
122 <td><a href="#DebugBase.move_instruction_pointer">move_instruction_pointer</a></td> 155 <td><a href="#DebugBase.move_instruction_pointer">move_instruction_pointer</a></td>
123 <td>Public methode to move the instruction pointer to another line.</td> 156 <td>Public methode to move the instruction pointer to another line.</td>
124 </tr><tr> 157 </tr>
158 <tr>
125 <td><a href="#DebugBase.profile">profile</a></td> 159 <td><a href="#DebugBase.profile">profile</a></td>
126 <td>Public method used to trace some stuff independent of the debugger trace function.</td> 160 <td>Public method used to trace some stuff independent of the debugger trace function.</td>
127 </tr><tr> 161 </tr>
162 <tr>
128 <td><a href="#DebugBase.profileWithRecursion">profileWithRecursion</a></td> 163 <td><a href="#DebugBase.profileWithRecursion">profileWithRecursion</a></td>
129 <td>Public method used to trace some stuff independent of the debugger trace function.</td> 164 <td>Public method used to trace some stuff independent of the debugger trace function.</td>
130 </tr><tr> 165 </tr>
166 <tr>
131 <td><a href="#DebugBase.run">run</a></td> 167 <td><a href="#DebugBase.run">run</a></td>
132 <td>Public method to start a given command under debugger control.</td> 168 <td>Public method to start a given command under debugger control.</td>
133 </tr><tr> 169 </tr>
170 <tr>
134 <td><a href="#DebugBase.setRecursionDepth">setRecursionDepth</a></td> 171 <td><a href="#DebugBase.setRecursionDepth">setRecursionDepth</a></td>
135 <td>Public method to determine the current recursion depth.</td> 172 <td>Public method to determine the current recursion depth.</td>
136 </tr><tr> 173 </tr>
174 <tr>
137 <td><a href="#DebugBase.set_continue">set_continue</a></td> 175 <td><a href="#DebugBase.set_continue">set_continue</a></td>
138 <td>Public method to stop only on next breakpoint.</td> 176 <td>Public method to stop only on next breakpoint.</td>
139 </tr><tr> 177 </tr>
178 <tr>
140 <td><a href="#DebugBase.set_next">set_next</a></td> 179 <td><a href="#DebugBase.set_next">set_next</a></td>
141 <td>Public method to stop on the next line in or below the given frame.</td> 180 <td>Public method to stop on the next line in or below the given frame.</td>
142 </tr><tr> 181 </tr>
182 <tr>
143 <td><a href="#DebugBase.set_quit">set_quit</a></td> 183 <td><a href="#DebugBase.set_quit">set_quit</a></td>
144 <td>Public method to quit.</td> 184 <td>Public method to quit.</td>
145 </tr><tr> 185 </tr>
186 <tr>
146 <td><a href="#DebugBase.set_return">set_return</a></td> 187 <td><a href="#DebugBase.set_return">set_return</a></td>
147 <td>Public method to stop when returning from the given frame.</td> 188 <td>Public method to stop when returning from the given frame.</td>
148 </tr><tr> 189 </tr>
190 <tr>
149 <td><a href="#DebugBase.set_step">set_step</a></td> 191 <td><a href="#DebugBase.set_step">set_step</a></td>
150 <td>Public method to stop after one line of code.</td> 192 <td>Public method to stop after one line of code.</td>
151 </tr><tr> 193 </tr>
194 <tr>
152 <td><a href="#DebugBase.set_trace">set_trace</a></td> 195 <td><a href="#DebugBase.set_trace">set_trace</a></td>
153 <td>Public method to start debugging from 'frame'.</td> 196 <td>Public method to start debugging from 'frame'.</td>
154 </tr><tr> 197 </tr>
198 <tr>
155 <td><a href="#DebugBase.step">step</a></td> 199 <td><a href="#DebugBase.step">step</a></td>
156 <td>Public method to perform a step operation in this thread.</td> 200 <td>Public method to perform a step operation in this thread.</td>
157 </tr><tr> 201 </tr>
202 <tr>
158 <td><a href="#DebugBase.stepOut">stepOut</a></td> 203 <td><a href="#DebugBase.stepOut">stepOut</a></td>
159 <td>Public method to perform a step out of the current call.</td> 204 <td>Public method to perform a step out of the current call.</td>
160 </tr><tr> 205 </tr>
206 <tr>
161 <td><a href="#DebugBase.stop_here">stop_here</a></td> 207 <td><a href="#DebugBase.stop_here">stop_here</a></td>
162 <td>Public method reimplemented to filter out debugger files.</td> 208 <td>Public method reimplemented to filter out debugger files.</td>
163 </tr><tr> 209 </tr>
210 <tr>
164 <td><a href="#DebugBase.storeFrameLocals">storeFrameLocals</a></td> 211 <td><a href="#DebugBase.storeFrameLocals">storeFrameLocals</a></td>
165 <td>Public method to store the locals into the frame, so an access to frame.f_locals returns the last data.</td> 212 <td>Public method to store the locals into the frame, so an access to frame.f_locals returns the last data.</td>
166 </tr><tr> 213 </tr>
214 <tr>
167 <td><a href="#DebugBase.tracePythonLibs">tracePythonLibs</a></td> 215 <td><a href="#DebugBase.tracePythonLibs">tracePythonLibs</a></td>
168 <td>Public method to update the settings to trace into Python libraries.</td> 216 <td>Public method to update the settings to trace into Python libraries.</td>
169 </tr><tr> 217 </tr>
218 <tr>
170 <td><a href="#DebugBase.trace_dispatch">trace_dispatch</a></td> 219 <td><a href="#DebugBase.trace_dispatch">trace_dispatch</a></td>
171 <td>Public method reimplemented from bdb.py to do some special things.</td> 220 <td>Public method reimplemented from bdb.py to do some special things.</td>
172 </tr><tr> 221 </tr>
222 <tr>
173 <td><a href="#DebugBase.user_exception">user_exception</a></td> 223 <td><a href="#DebugBase.user_exception">user_exception</a></td>
174 <td>Public method reimplemented to report an exception to the debug server.</td> 224 <td>Public method reimplemented to report an exception to the debug server.</td>
175 </tr><tr> 225 </tr>
226 <tr>
176 <td><a href="#DebugBase.user_line">user_line</a></td> 227 <td><a href="#DebugBase.user_line">user_line</a></td>
177 <td>Public method reimplemented to handle the program about to execute a particular line.</td> 228 <td>Public method reimplemented to handle the program about to execute a particular line.</td>
178 </tr> 229 </tr>
179 </table> 230 </table>
180 <h3>Static Methods</h3> 231 <h3>Static Methods</h3>
232
181 <table> 233 <table>
182 <tr><td>None</td></tr> 234 <tr><td>None</td></tr>
183 </table> 235 </table>
236
184 <a NAME="DebugBase.__init__" ID="DebugBase.__init__"></a> 237 <a NAME="DebugBase.__init__" ID="DebugBase.__init__"></a>
185 <h4>DebugBase (Constructor)</h4> 238 <h4>DebugBase (Constructor)</h4>
186 <b>DebugBase</b>(<i>dbgClient</i>) 239 <b>DebugBase</b>(<i>dbgClient</i>)
240
187 <p> 241 <p>
188 Constructor 242 Constructor
189 </p><dl> 243 </p>
244 <dl>
245
190 <dt><i>dbgClient</i></dt> 246 <dt><i>dbgClient</i></dt>
191 <dd> 247 <dd>
192 the owning client 248 the owning client
193 </dd> 249 </dd>
194 </dl><a NAME="DebugBase.__checkBreakInFrame" ID="DebugBase.__checkBreakInFrame"></a> 250 </dl>
251 <a NAME="DebugBase.__checkBreakInFrame" ID="DebugBase.__checkBreakInFrame"></a>
195 <h4>DebugBase.__checkBreakInFrame</h4> 252 <h4>DebugBase.__checkBreakInFrame</h4>
196 <b>__checkBreakInFrame</b>(<i>frame</i>) 253 <b>__checkBreakInFrame</b>(<i>frame</i>)
254
197 <p> 255 <p>
198 Private method to check if the function / method has a line number 256 Private method to check if the function / method has a line number
199 which is a breakpoint. 257 which is a breakpoint.
200 </p><dl> 258 </p>
259 <dl>
260
201 <dt><i>frame</i> (frame object)</dt> 261 <dt><i>frame</i> (frame object)</dt>
202 <dd> 262 <dd>
203 the frame object 263 the frame object
204 </dd> 264 </dd>
205 </dl><dl> 265 </dl>
266 <dl>
206 <dt>Returns:</dt> 267 <dt>Returns:</dt>
207 <dd> 268 <dd>
208 Flag indicating a function / method with breakpoint 269 Flag indicating a function / method with breakpoint
209 </dd> 270 </dd>
210 </dl><dl> 271 </dl>
272 <dl>
211 <dt>Return Type:</dt> 273 <dt>Return Type:</dt>
212 <dd> 274 <dd>
213 bool 275 bool
214 </dd> 276 </dd>
215 </dl><a NAME="DebugBase.__do_clearBreak" ID="DebugBase.__do_clearBreak"></a> 277 </dl>
278 <a NAME="DebugBase.__do_clearBreak" ID="DebugBase.__do_clearBreak"></a>
216 <h4>DebugBase.__do_clearBreak</h4> 279 <h4>DebugBase.__do_clearBreak</h4>
217 <b>__do_clearBreak</b>(<i>filename, lineno</i>) 280 <b>__do_clearBreak</b>(<i>filename, lineno</i>)
281
218 <p> 282 <p>
219 Private method called to clear a temporary breakpoint. 283 Private method called to clear a temporary breakpoint.
220 </p><dl> 284 </p>
285 <dl>
286
221 <dt><i>filename</i> (str)</dt> 287 <dt><i>filename</i> (str)</dt>
222 <dd> 288 <dd>
223 name of the file the bp belongs to 289 name of the file the bp belongs to
224 </dd><dt><i>lineno</i> (int)</dt> 290 </dd>
291 <dt><i>lineno</i> (int)</dt>
225 <dd> 292 <dd>
226 linenumber of the bp 293 linenumber of the bp
227 </dd> 294 </dd>
228 </dl><a NAME="DebugBase.__do_clearWatch" ID="DebugBase.__do_clearWatch"></a> 295 </dl>
296 <a NAME="DebugBase.__do_clearWatch" ID="DebugBase.__do_clearWatch"></a>
229 <h4>DebugBase.__do_clearWatch</h4> 297 <h4>DebugBase.__do_clearWatch</h4>
230 <b>__do_clearWatch</b>(<i>cond</i>) 298 <b>__do_clearWatch</b>(<i>cond</i>)
299
231 <p> 300 <p>
232 Private method called to clear a temporary watch expression. 301 Private method called to clear a temporary watch expression.
233 </p><dl> 302 </p>
303 <dl>
304
234 <dt><i>cond</i> (str)</dt> 305 <dt><i>cond</i> (str)</dt>
235 <dd> 306 <dd>
236 expression of the watch expression to be cleared 307 expression of the watch expression to be cleared
237 </dd> 308 </dd>
238 </dl><a NAME="DebugBase.__eventPollTimer" ID="DebugBase.__eventPollTimer"></a> 309 </dl>
310 <a NAME="DebugBase.__eventPollTimer" ID="DebugBase.__eventPollTimer"></a>
239 <h4>DebugBase.__eventPollTimer</h4> 311 <h4>DebugBase.__eventPollTimer</h4>
240 <b>__eventPollTimer</b>(<i></i>) 312 <b>__eventPollTimer</b>(<i></i>)
313
241 <p> 314 <p>
242 Private method to set a flag every 0.5 s to check for new messages. 315 Private method to set a flag every 0.5 s to check for new messages.
243 </p><a NAME="DebugBase.__extractExceptionName" ID="DebugBase.__extractExceptionName"></a> 316 </p>
317 <a NAME="DebugBase.__extractExceptionName" ID="DebugBase.__extractExceptionName"></a>
244 <h4>DebugBase.__extractExceptionName</h4> 318 <h4>DebugBase.__extractExceptionName</h4>
245 <b>__extractExceptionName</b>(<i>exctype</i>) 319 <b>__extractExceptionName</b>(<i>exctype</i>)
320
246 <p> 321 <p>
247 Private method to extract the exception name given the exception 322 Private method to extract the exception name given the exception
248 type object. 323 type object.
249 </p><dl> 324 </p>
325 <dl>
326
250 <dt><i>exctype</i></dt> 327 <dt><i>exctype</i></dt>
251 <dd> 328 <dd>
252 type of the exception 329 type of the exception
253 </dd> 330 </dd>
254 </dl><dl> 331 </dl>
332 <dl>
255 <dt>Returns:</dt> 333 <dt>Returns:</dt>
256 <dd> 334 <dd>
257 exception name (string) 335 exception name (string)
258 </dd> 336 </dd>
259 </dl><a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a> 337 </dl>
338 <a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a>
260 <h4>DebugBase.__extractSystemExitMessage</h4> 339 <h4>DebugBase.__extractSystemExitMessage</h4>
261 <b>__extractSystemExitMessage</b>(<i>excinfo</i>) 340 <b>__extractSystemExitMessage</b>(<i>excinfo</i>)
341
262 <p> 342 <p>
263 Private method to get the SystemExit code and message. 343 Private method to get the SystemExit code and message.
264 </p><dl> 344 </p>
345 <dl>
346
265 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt> 347 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt>
266 <dd> 348 <dd>
267 details about the SystemExit exception 349 details about the SystemExit exception
268 </dd> 350 </dd>
269 </dl><dl> 351 </dl>
352 <dl>
270 <dt>Returns:</dt> 353 <dt>Returns:</dt>
271 <dd> 354 <dd>
272 SystemExit code and message 355 SystemExit code and message
273 </dd> 356 </dd>
274 </dl><dl> 357 </dl>
358 <dl>
275 <dt>Return Type:</dt> 359 <dt>Return Type:</dt>
276 <dd> 360 <dd>
277 int, str 361 int, str
278 </dd> 362 </dd>
279 </dl><a NAME="DebugBase.__extract_stack" ID="DebugBase.__extract_stack"></a> 363 </dl>
364 <a NAME="DebugBase.__extract_stack" ID="DebugBase.__extract_stack"></a>
280 <h4>DebugBase.__extract_stack</h4> 365 <h4>DebugBase.__extract_stack</h4>
281 <b>__extract_stack</b>(<i>exctb</i>) 366 <b>__extract_stack</b>(<i>exctb</i>)
367
282 <p> 368 <p>
283 Private member to return a list of stack frames. 369 Private member to return a list of stack frames.
284 </p><dl> 370 </p>
371 <dl>
372
285 <dt><i>exctb</i></dt> 373 <dt><i>exctb</i></dt>
286 <dd> 374 <dd>
287 exception traceback 375 exception traceback
288 </dd> 376 </dd>
289 </dl><dl> 377 </dl>
378 <dl>
290 <dt>Returns:</dt> 379 <dt>Returns:</dt>
291 <dd> 380 <dd>
292 list of stack frames 381 list of stack frames
293 </dd> 382 </dd>
294 </dl><a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a> 383 </dl>
384 <a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a>
295 <h4>DebugBase.__sendCallTrace</h4> 385 <h4>DebugBase.__sendCallTrace</h4>
296 <b>__sendCallTrace</b>(<i>event, fromFrame, toFrame</i>) 386 <b>__sendCallTrace</b>(<i>event, fromFrame, toFrame</i>)
387
297 <p> 388 <p>
298 Private method to send a call/return trace. 389 Private method to send a call/return trace.
299 </p><dl> 390 </p>
391 <dl>
392
300 <dt><i>event</i> (str)</dt> 393 <dt><i>event</i> (str)</dt>
301 <dd> 394 <dd>
302 trace event 395 trace event
303 </dd><dt><i>fromFrame</i> (frame object)</dt> 396 </dd>
397 <dt><i>fromFrame</i> (frame object)</dt>
304 <dd> 398 <dd>
305 originating frame 399 originating frame
306 </dd><dt><i>toFrame</i> (frame object)</dt> 400 </dd>
401 <dt><i>toFrame</i> (frame object)</dt>
307 <dd> 402 <dd>
308 destination frame 403 destination frame
309 </dd> 404 </dd>
310 </dl><a NAME="DebugBase.__skipFrame" ID="DebugBase.__skipFrame"></a> 405 </dl>
406 <a NAME="DebugBase.__skipFrame" ID="DebugBase.__skipFrame"></a>
311 <h4>DebugBase.__skipFrame</h4> 407 <h4>DebugBase.__skipFrame</h4>
312 <b>__skipFrame</b>(<i>frame</i>) 408 <b>__skipFrame</b>(<i>frame</i>)
409
313 <p> 410 <p>
314 Private method to filter out debugger files. 411 Private method to filter out debugger files.
315 </p><p> 412 </p>
413 <p>
316 Tracing is turned off for files that are part of the 414 Tracing is turned off for files that are part of the
317 debugger that are called from the application being debugged. 415 debugger that are called from the application being debugged.
318 </p><dl> 416 </p>
417 <dl>
418
319 <dt><i>frame</i> (frame object)</dt> 419 <dt><i>frame</i> (frame object)</dt>
320 <dd> 420 <dd>
321 the frame object 421 the frame object
322 </dd> 422 </dd>
323 </dl><dl> 423 </dl>
424 <dl>
324 <dt>Returns:</dt> 425 <dt>Returns:</dt>
325 <dd> 426 <dd>
326 flag indicating whether the debugger should skip this frame 427 flag indicating whether the debugger should skip this frame
327 </dd> 428 </dd>
328 </dl><dl> 429 </dl>
430 <dl>
329 <dt>Return Type:</dt> 431 <dt>Return Type:</dt>
330 <dd> 432 <dd>
331 bool 433 bool
332 </dd> 434 </dd>
333 </dl><a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a> 435 </dl>
436 <a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a>
334 <h4>DebugBase._set_stopinfo</h4> 437 <h4>DebugBase._set_stopinfo</h4>
335 <b>_set_stopinfo</b>(<i>stopframe, returnframe</i>) 438 <b>_set_stopinfo</b>(<i>stopframe, returnframe</i>)
439
336 <p> 440 <p>
337 Protected method to update the frame pointers. 441 Protected method to update the frame pointers.
338 </p><dl> 442 </p>
443 <dl>
444
339 <dt><i>stopframe</i> (frame object)</dt> 445 <dt><i>stopframe</i> (frame object)</dt>
340 <dd> 446 <dd>
341 the frame object where to stop 447 the frame object where to stop
342 </dd><dt><i>returnframe</i> (frame object)</dt> 448 </dd>
449 <dt><i>returnframe</i> (frame object)</dt>
343 <dd> 450 <dd>
344 the frame object where to stop on a function return 451 the frame object where to stop on a function return
345 </dd> 452 </dd>
346 </dl><a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a> 453 </dl>
454 <a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a>
347 <h4>DebugBase.bootstrap</h4> 455 <h4>DebugBase.bootstrap</h4>
348 <b>bootstrap</b>(<i>target, args, kwargs</i>) 456 <b>bootstrap</b>(<i>target, args, kwargs</i>)
457
349 <p> 458 <p>
350 Public method to bootstrap a thread. 459 Public method to bootstrap a thread.
351 </p><p> 460 </p>
461 <p>
352 It wraps the call to the user function to enable tracing 462 It wraps the call to the user function to enable tracing
353 before hand. 463 before hand.
354 </p><dl> 464 </p>
465 <dl>
466
355 <dt><i>target</i> (function pointer)</dt> 467 <dt><i>target</i> (function pointer)</dt>
356 <dd> 468 <dd>
357 function which is called in the new created thread 469 function which is called in the new created thread
358 </dd><dt><i>args</i> (tuple)</dt> 470 </dd>
471 <dt><i>args</i> (tuple)</dt>
359 <dd> 472 <dd>
360 arguments to pass to target 473 arguments to pass to target
361 </dd><dt><i>kwargs</i> (dict)</dt> 474 </dd>
475 <dt><i>kwargs</i> (dict)</dt>
362 <dd> 476 <dd>
363 keyword arguments to pass to target 477 keyword arguments to pass to target
364 </dd> 478 </dd>
365 </dl><a NAME="DebugBase.break_here" ID="DebugBase.break_here"></a> 479 </dl>
480 <a NAME="DebugBase.break_here" ID="DebugBase.break_here"></a>
366 <h4>DebugBase.break_here</h4> 481 <h4>DebugBase.break_here</h4>
367 <b>break_here</b>(<i>frame</i>) 482 <b>break_here</b>(<i>frame</i>)
483
368 <p> 484 <p>
369 Public method reimplemented from bdb.py to fix the filename from the 485 Public method reimplemented from bdb.py to fix the filename from the
370 frame. 486 frame.
371 </p><p> 487 </p>
488 <p>
372 See fix_frame_filename for more info. 489 See fix_frame_filename for more info.
373 </p><dl> 490 </p>
491 <dl>
492
374 <dt><i>frame</i> (frame object)</dt> 493 <dt><i>frame</i> (frame object)</dt>
375 <dd> 494 <dd>
376 the frame object 495 the frame object
377 </dd> 496 </dd>
378 </dl><dl> 497 </dl>
498 <dl>
379 <dt>Returns:</dt> 499 <dt>Returns:</dt>
380 <dd> 500 <dd>
381 flag indicating the break status 501 flag indicating the break status
382 </dd> 502 </dd>
383 </dl><dl> 503 </dl>
504 <dl>
384 <dt>Return Type:</dt> 505 <dt>Return Type:</dt>
385 <dd> 506 <dd>
386 bool 507 bool
387 </dd> 508 </dd>
388 </dl><a NAME="DebugBase.fix_frame_filename" ID="DebugBase.fix_frame_filename"></a> 509 </dl>
510 <a NAME="DebugBase.fix_frame_filename" ID="DebugBase.fix_frame_filename"></a>
389 <h4>DebugBase.fix_frame_filename</h4> 511 <h4>DebugBase.fix_frame_filename</h4>
390 <b>fix_frame_filename</b>(<i>frame</i>) 512 <b>fix_frame_filename</b>(<i>frame</i>)
513
391 <p> 514 <p>
392 Public method used to fixup the filename for a given frame. 515 Public method used to fixup the filename for a given frame.
393 </p><p> 516 </p>
517 <p>
394 The logic employed here is that if a module was loaded 518 The logic employed here is that if a module was loaded
395 from a .pyc file, then the correct .py to operate with 519 from a .pyc file, then the correct .py to operate with
396 should be in the same path as the .pyc. The reason this 520 should be in the same path as the .pyc. The reason this
397 logic is needed is that when a .pyc file is generated, the 521 logic is needed is that when a .pyc file is generated, the
398 filename embedded and thus what is readable in the code object 522 filename embedded and thus what is readable in the code object
399 of the frame object is the fully qualified filepath when the 523 of the frame object is the fully qualified filepath when the
400 pyc is generated. If files are moved from machine to machine 524 pyc is generated. If files are moved from machine to machine
401 this can break debugging as the .pyc will refer to the .py 525 this can break debugging as the .pyc will refer to the .py
402 on the original machine. Another case might be sharing 526 on the original machine. Another case might be sharing
403 code over a network... This logic deals with that. 527 code over a network... This logic deals with that.
404 </p><dl> 528 </p>
529 <dl>
530
405 <dt><i>frame</i> (frame object)</dt> 531 <dt><i>frame</i> (frame object)</dt>
406 <dd> 532 <dd>
407 the frame object 533 the frame object
408 </dd> 534 </dd>
409 </dl><dl> 535 </dl>
536 <dl>
410 <dt>Returns:</dt> 537 <dt>Returns:</dt>
411 <dd> 538 <dd>
412 fixed up file name 539 fixed up file name
413 </dd> 540 </dd>
414 </dl><dl> 541 </dl>
542 <dl>
415 <dt>Return Type:</dt> 543 <dt>Return Type:</dt>
416 <dd> 544 <dd>
417 str 545 str
418 </dd> 546 </dd>
419 </dl><a NAME="DebugBase.getCurrentFrame" ID="DebugBase.getCurrentFrame"></a> 547 </dl>
548 <a NAME="DebugBase.getCurrentFrame" ID="DebugBase.getCurrentFrame"></a>
420 <h4>DebugBase.getCurrentFrame</h4> 549 <h4>DebugBase.getCurrentFrame</h4>
421 <b>getCurrentFrame</b>(<i></i>) 550 <b>getCurrentFrame</b>(<i></i>)
551
422 <p> 552 <p>
423 Public method to return the current frame. 553 Public method to return the current frame.
424 </p><dl> 554 </p>
555 <dl>
425 <dt>Returns:</dt> 556 <dt>Returns:</dt>
426 <dd> 557 <dd>
427 the current frame 558 the current frame
428 </dd> 559 </dd>
429 </dl><dl> 560 </dl>
561 <dl>
430 <dt>Return Type:</dt> 562 <dt>Return Type:</dt>
431 <dd> 563 <dd>
432 frame object 564 frame object
433 </dd> 565 </dd>
434 </dl><a NAME="DebugBase.getFrameLocals" ID="DebugBase.getFrameLocals"></a> 566 </dl>
567 <a NAME="DebugBase.getFrameLocals" ID="DebugBase.getFrameLocals"></a>
435 <h4>DebugBase.getFrameLocals</h4> 568 <h4>DebugBase.getFrameLocals</h4>
436 <b>getFrameLocals</b>(<i>frmnr=0</i>) 569 <b>getFrameLocals</b>(<i>frmnr=0</i>)
570
437 <p> 571 <p>
438 Public method to return the locals dictionary of the current frame 572 Public method to return the locals dictionary of the current frame
439 or a frame below. 573 or a frame below.
440 </p><dl> 574 </p>
575 <dl>
576
441 <dt><i>frmnr=</i></dt> 577 <dt><i>frmnr=</i></dt>
442 <dd> 578 <dd>
443 distance of frame to get locals dictionary of. 0 is 579 distance of frame to get locals dictionary of. 0 is
444 the current frame (int) 580 the current frame (int)
445 </dd> 581 </dd>
446 </dl><dl> 582 </dl>
583 <dl>
447 <dt>Returns:</dt> 584 <dt>Returns:</dt>
448 <dd> 585 <dd>
449 locals dictionary of the frame 586 locals dictionary of the frame
450 </dd> 587 </dd>
451 </dl><a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a> 588 </dl>
589 <a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a>
452 <h4>DebugBase.getStack</h4> 590 <h4>DebugBase.getStack</h4>
453 <b>getStack</b>(<i>frame=None, applyTrace=False</i>) 591 <b>getStack</b>(<i>frame=None, applyTrace=False</i>)
592
454 <p> 593 <p>
455 Public method to get the stack. 594 Public method to get the stack.
456 </p><dl> 595 </p>
596 <dl>
597
457 <dt><i>frame=</i> (frame object or list)</dt> 598 <dt><i>frame=</i> (frame object or list)</dt>
458 <dd> 599 <dd>
459 frame object to inspect 600 frame object to inspect
460 </dd><dt><i>applyTrace=</i> (bool)</dt> 601 </dd>
602 <dt><i>applyTrace=</i> (bool)</dt>
461 <dd> 603 <dd>
462 flag to assign trace function to fr.f_trace 604 flag to assign trace function to fr.f_trace
463 </dd> 605 </dd>
464 </dl><dl> 606 </dl>
607 <dl>
465 <dt>Returns:</dt> 608 <dt>Returns:</dt>
466 <dd> 609 <dd>
467 list of lists with file name (string), line number (integer) 610 list of lists with file name (string), line number (integer)
468 and function name (string) 611 and function name (string)
469 </dd> 612 </dd>
470 </dl><a NAME="DebugBase.go" ID="DebugBase.go"></a> 613 </dl>
614 <a NAME="DebugBase.go" ID="DebugBase.go"></a>
471 <h4>DebugBase.go</h4> 615 <h4>DebugBase.go</h4>
472 <b>go</b>(<i>special</i>) 616 <b>go</b>(<i>special</i>)
617
473 <p> 618 <p>
474 Public method to resume the thread. 619 Public method to resume the thread.
475 </p><p> 620 </p>
621 <p>
476 It resumes the thread stopping only at breakpoints or exceptions. 622 It resumes the thread stopping only at breakpoints or exceptions.
477 </p><dl> 623 </p>
624 <dl>
625
478 <dt><i>special</i></dt> 626 <dt><i>special</i></dt>
479 <dd> 627 <dd>
480 flag indicating a special continue operation 628 flag indicating a special continue operation
481 </dd> 629 </dd>
482 </dl><a NAME="DebugBase.move_instruction_pointer" ID="DebugBase.move_instruction_pointer"></a> 630 </dl>
631 <a NAME="DebugBase.move_instruction_pointer" ID="DebugBase.move_instruction_pointer"></a>
483 <h4>DebugBase.move_instruction_pointer</h4> 632 <h4>DebugBase.move_instruction_pointer</h4>
484 <b>move_instruction_pointer</b>(<i>lineno</i>) 633 <b>move_instruction_pointer</b>(<i>lineno</i>)
634
485 <p> 635 <p>
486 Public methode to move the instruction pointer to another line. 636 Public methode to move the instruction pointer to another line.
487 </p><dl> 637 </p>
638 <dl>
639
488 <dt><i>lineno</i> (int)</dt> 640 <dt><i>lineno</i> (int)</dt>
489 <dd> 641 <dd>
490 new line number 642 new line number
491 </dd> 643 </dd>
492 </dl><a NAME="DebugBase.profile" ID="DebugBase.profile"></a> 644 </dl>
645 <a NAME="DebugBase.profile" ID="DebugBase.profile"></a>
493 <h4>DebugBase.profile</h4> 646 <h4>DebugBase.profile</h4>
494 <b>profile</b>(<i>frame, event, arg</i>) 647 <b>profile</b>(<i>frame, event, arg</i>)
648
495 <p> 649 <p>
496 Public method used to trace some stuff independent of the debugger 650 Public method used to trace some stuff independent of the debugger
497 trace function. 651 trace function.
498 </p><dl> 652 </p>
653 <dl>
654
499 <dt><i>frame</i> (frame object)</dt> 655 <dt><i>frame</i> (frame object)</dt>
500 <dd> 656 <dd>
501 current stack frame 657 current stack frame
502 </dd><dt><i>event</i> (str)</dt> 658 </dd>
659 <dt><i>event</i> (str)</dt>
503 <dd> 660 <dd>
504 trace event 661 trace event
505 </dd><dt><i>arg</i> (depends on the previous event parameter)</dt> 662 </dd>
663 <dt><i>arg</i> (depends on the previous event parameter)</dt>
506 <dd> 664 <dd>
507 arguments 665 arguments
508 </dd> 666 </dd>
509 </dl><a NAME="DebugBase.profileWithRecursion" ID="DebugBase.profileWithRecursion"></a> 667 </dl>
668 <a NAME="DebugBase.profileWithRecursion" ID="DebugBase.profileWithRecursion"></a>
510 <h4>DebugBase.profileWithRecursion</h4> 669 <h4>DebugBase.profileWithRecursion</h4>
511 <b>profileWithRecursion</b>(<i>frame, event, arg</i>) 670 <b>profileWithRecursion</b>(<i>frame, event, arg</i>)
671
512 <p> 672 <p>
513 Public method used to trace some stuff independent of the debugger 673 Public method used to trace some stuff independent of the debugger
514 trace function. 674 trace function.
515 </p><dl> 675 </p>
676 <dl>
677
516 <dt><i>frame</i> (frame object)</dt> 678 <dt><i>frame</i> (frame object)</dt>
517 <dd> 679 <dd>
518 current stack frame 680 current stack frame
519 </dd><dt><i>event</i> (str)</dt> 681 </dd>
682 <dt><i>event</i> (str)</dt>
520 <dd> 683 <dd>
521 trace event 684 trace event
522 </dd><dt><i>arg</i> (depends on the previous event parameter)</dt> 685 </dd>
686 <dt><i>arg</i> (depends on the previous event parameter)</dt>
523 <dd> 687 <dd>
524 arguments 688 arguments
525 </dd> 689 </dd>
526 </dl><dl> 690 </dl>
691 <dl>
692
527 <dt>Raises <b>RuntimeError</b>:</dt> 693 <dt>Raises <b>RuntimeError</b>:</dt>
528 <dd> 694 <dd>
529 raised to indicate too many recursions 695 raised to indicate too many recursions
530 </dd> 696 </dd>
531 </dl><a NAME="DebugBase.run" ID="DebugBase.run"></a> 697 </dl>
698 <a NAME="DebugBase.run" ID="DebugBase.run"></a>
532 <h4>DebugBase.run</h4> 699 <h4>DebugBase.run</h4>
533 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True</i>) 700 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True</i>)
701
534 <p> 702 <p>
535 Public method to start a given command under debugger control. 703 Public method to start a given command under debugger control.
536 </p><dl> 704 </p>
705 <dl>
706
537 <dt><i>cmd</i> (str or CodeType)</dt> 707 <dt><i>cmd</i> (str or CodeType)</dt>
538 <dd> 708 <dd>
539 command / code to execute under debugger control 709 command / code to execute under debugger control
540 </dd><dt><i>globalsDict=</i> (dict)</dt> 710 </dd>
711 <dt><i>globalsDict=</i> (dict)</dt>
541 <dd> 712 <dd>
542 dictionary of global variables for cmd 713 dictionary of global variables for cmd
543 </dd><dt><i>localsDict=</i> (dict)</dt> 714 </dd>
715 <dt><i>localsDict=</i> (dict)</dt>
544 <dd> 716 <dd>
545 dictionary of local variables for cmd 717 dictionary of local variables for cmd
546 </dd><dt><i>debug=</i> (bool)</dt> 718 </dd>
719 <dt><i>debug=</i> (bool)</dt>
547 <dd> 720 <dd>
548 flag if command should run under debugger control 721 flag if command should run under debugger control
549 </dd> 722 </dd>
550 </dl><a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a> 723 </dl>
724 <a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a>
551 <h4>DebugBase.setRecursionDepth</h4> 725 <h4>DebugBase.setRecursionDepth</h4>
552 <b>setRecursionDepth</b>(<i>frame</i>) 726 <b>setRecursionDepth</b>(<i>frame</i>)
727
553 <p> 728 <p>
554 Public method to determine the current recursion depth. 729 Public method to determine the current recursion depth.
555 </p><dl> 730 </p>
731 <dl>
732
556 <dt><i>frame</i></dt> 733 <dt><i>frame</i></dt>
557 <dd> 734 <dd>
558 The current stack frame. 735 The current stack frame.
559 </dd> 736 </dd>
560 </dl><a NAME="DebugBase.set_continue" ID="DebugBase.set_continue"></a> 737 </dl>
738 <a NAME="DebugBase.set_continue" ID="DebugBase.set_continue"></a>
561 <h4>DebugBase.set_continue</h4> 739 <h4>DebugBase.set_continue</h4>
562 <b>set_continue</b>(<i>special</i>) 740 <b>set_continue</b>(<i>special</i>)
741
563 <p> 742 <p>
564 Public method to stop only on next breakpoint. 743 Public method to stop only on next breakpoint.
565 </p><dl> 744 </p>
745 <dl>
746
566 <dt><i>special</i> (bool)</dt> 747 <dt><i>special</i> (bool)</dt>
567 <dd> 748 <dd>
568 flag indicating a special continue operation 749 flag indicating a special continue operation
569 </dd> 750 </dd>
570 </dl><a NAME="DebugBase.set_next" ID="DebugBase.set_next"></a> 751 </dl>
752 <a NAME="DebugBase.set_next" ID="DebugBase.set_next"></a>
571 <h4>DebugBase.set_next</h4> 753 <h4>DebugBase.set_next</h4>
572 <b>set_next</b>(<i>frame</i>) 754 <b>set_next</b>(<i>frame</i>)
755
573 <p> 756 <p>
574 Public method to stop on the next line in or below the given frame. 757 Public method to stop on the next line in or below the given frame.
575 </p><dl> 758 </p>
759 <dl>
760
576 <dt><i>frame</i> (frame object)</dt> 761 <dt><i>frame</i> (frame object)</dt>
577 <dd> 762 <dd>
578 the frame object 763 the frame object
579 </dd> 764 </dd>
580 </dl><a NAME="DebugBase.set_quit" ID="DebugBase.set_quit"></a> 765 </dl>
766 <a NAME="DebugBase.set_quit" ID="DebugBase.set_quit"></a>
581 <h4>DebugBase.set_quit</h4> 767 <h4>DebugBase.set_quit</h4>
582 <b>set_quit</b>(<i></i>) 768 <b>set_quit</b>(<i></i>)
769
583 <p> 770 <p>
584 Public method to quit. 771 Public method to quit.
585 </p><p> 772 </p>
773 <p>
586 Disables the trace functions and resets all frame pointer. 774 Disables the trace functions and resets all frame pointer.
587 </p><a NAME="DebugBase.set_return" ID="DebugBase.set_return"></a> 775 </p>
776 <a NAME="DebugBase.set_return" ID="DebugBase.set_return"></a>
588 <h4>DebugBase.set_return</h4> 777 <h4>DebugBase.set_return</h4>
589 <b>set_return</b>(<i>frame</i>) 778 <b>set_return</b>(<i>frame</i>)
779
590 <p> 780 <p>
591 Public method to stop when returning from the given frame. 781 Public method to stop when returning from the given frame.
592 </p><dl> 782 </p>
783 <dl>
784
593 <dt><i>frame</i> (frame object)</dt> 785 <dt><i>frame</i> (frame object)</dt>
594 <dd> 786 <dd>
595 the frame object 787 the frame object
596 </dd> 788 </dd>
597 </dl><a NAME="DebugBase.set_step" ID="DebugBase.set_step"></a> 789 </dl>
790 <a NAME="DebugBase.set_step" ID="DebugBase.set_step"></a>
598 <h4>DebugBase.set_step</h4> 791 <h4>DebugBase.set_step</h4>
599 <b>set_step</b>(<i></i>) 792 <b>set_step</b>(<i></i>)
793
600 <p> 794 <p>
601 Public method to stop after one line of code. 795 Public method to stop after one line of code.
602 </p><a NAME="DebugBase.set_trace" ID="DebugBase.set_trace"></a> 796 </p>
797 <a NAME="DebugBase.set_trace" ID="DebugBase.set_trace"></a>
603 <h4>DebugBase.set_trace</h4> 798 <h4>DebugBase.set_trace</h4>
604 <b>set_trace</b>(<i>frame=None</i>) 799 <b>set_trace</b>(<i>frame=None</i>)
800
605 <p> 801 <p>
606 Public method to start debugging from 'frame'. 802 Public method to start debugging from 'frame'.
607 </p><p> 803 </p>
804 <p>
608 If frame is not specified, debugging starts from caller's frame. 805 If frame is not specified, debugging starts from caller's frame.
609 Because of jump optimizations it's not possible to use sys.breakpoint() 806 Because of jump optimizations it's not possible to use sys.breakpoint()
610 as last instruction in a function or method. 807 as last instruction in a function or method.
611 </p><dl> 808 </p>
809 <dl>
810
612 <dt><i>frame=</i> (frame object)</dt> 811 <dt><i>frame=</i> (frame object)</dt>
613 <dd> 812 <dd>
614 frame to start debugging from 813 frame to start debugging from
615 </dd> 814 </dd>
616 </dl><a NAME="DebugBase.step" ID="DebugBase.step"></a> 815 </dl>
816 <a NAME="DebugBase.step" ID="DebugBase.step"></a>
617 <h4>DebugBase.step</h4> 817 <h4>DebugBase.step</h4>
618 <b>step</b>(<i>traceMode</i>) 818 <b>step</b>(<i>traceMode</i>)
819
619 <p> 820 <p>
620 Public method to perform a step operation in this thread. 821 Public method to perform a step operation in this thread.
621 </p><dl> 822 </p>
823 <dl>
824
622 <dt><i>traceMode</i></dt> 825 <dt><i>traceMode</i></dt>
623 <dd> 826 <dd>
624 If it is True, then the step is a step into, 827 If it is True, then the step is a step into,
625 otherwise it is a step over. 828 otherwise it is a step over.
626 </dd> 829 </dd>
627 </dl><a NAME="DebugBase.stepOut" ID="DebugBase.stepOut"></a> 830 </dl>
831 <a NAME="DebugBase.stepOut" ID="DebugBase.stepOut"></a>
628 <h4>DebugBase.stepOut</h4> 832 <h4>DebugBase.stepOut</h4>
629 <b>stepOut</b>(<i></i>) 833 <b>stepOut</b>(<i></i>)
834
630 <p> 835 <p>
631 Public method to perform a step out of the current call. 836 Public method to perform a step out of the current call.
632 </p><a NAME="DebugBase.stop_here" ID="DebugBase.stop_here"></a> 837 </p>
838 <a NAME="DebugBase.stop_here" ID="DebugBase.stop_here"></a>
633 <h4>DebugBase.stop_here</h4> 839 <h4>DebugBase.stop_here</h4>
634 <b>stop_here</b>(<i>frame</i>) 840 <b>stop_here</b>(<i>frame</i>)
841
635 <p> 842 <p>
636 Public method reimplemented to filter out debugger files. 843 Public method reimplemented to filter out debugger files.
637 </p><p> 844 </p>
845 <p>
638 Tracing is turned off for files that are part of the 846 Tracing is turned off for files that are part of the
639 debugger that are called from the application being debugged. 847 debugger that are called from the application being debugged.
640 </p><dl> 848 </p>
849 <dl>
850
641 <dt><i>frame</i> (frame object)</dt> 851 <dt><i>frame</i> (frame object)</dt>
642 <dd> 852 <dd>
643 the frame object 853 the frame object
644 </dd> 854 </dd>
645 </dl><dl> 855 </dl>
856 <dl>
646 <dt>Returns:</dt> 857 <dt>Returns:</dt>
647 <dd> 858 <dd>
648 flag indicating whether the debugger should stop here 859 flag indicating whether the debugger should stop here
649 </dd> 860 </dd>
650 </dl><dl> 861 </dl>
862 <dl>
651 <dt>Return Type:</dt> 863 <dt>Return Type:</dt>
652 <dd> 864 <dd>
653 bool 865 bool
654 </dd> 866 </dd>
655 </dl><a NAME="DebugBase.storeFrameLocals" ID="DebugBase.storeFrameLocals"></a> 867 </dl>
868 <a NAME="DebugBase.storeFrameLocals" ID="DebugBase.storeFrameLocals"></a>
656 <h4>DebugBase.storeFrameLocals</h4> 869 <h4>DebugBase.storeFrameLocals</h4>
657 <b>storeFrameLocals</b>(<i>frmnr=0</i>) 870 <b>storeFrameLocals</b>(<i>frmnr=0</i>)
871
658 <p> 872 <p>
659 Public method to store the locals into the frame, so an access to 873 Public method to store the locals into the frame, so an access to
660 frame.f_locals returns the last data. 874 frame.f_locals returns the last data.
661 </p><dl> 875 </p>
876 <dl>
877
662 <dt><i>frmnr=</i></dt> 878 <dt><i>frmnr=</i></dt>
663 <dd> 879 <dd>
664 distance of frame to store locals dictionary to. 0 is 880 distance of frame to store locals dictionary to. 0 is
665 the current frame (int) 881 the current frame (int)
666 </dd> 882 </dd>
667 </dl><a NAME="DebugBase.tracePythonLibs" ID="DebugBase.tracePythonLibs"></a> 883 </dl>
884 <a NAME="DebugBase.tracePythonLibs" ID="DebugBase.tracePythonLibs"></a>
668 <h4>DebugBase.tracePythonLibs</h4> 885 <h4>DebugBase.tracePythonLibs</h4>
669 <b>tracePythonLibs</b>(<i>enable</i>) 886 <b>tracePythonLibs</b>(<i>enable</i>)
887
670 <p> 888 <p>
671 Public method to update the settings to trace into Python libraries. 889 Public method to update the settings to trace into Python libraries.
672 </p><dl> 890 </p>
891 <dl>
892
673 <dt><i>enable</i> (bool)</dt> 893 <dt><i>enable</i> (bool)</dt>
674 <dd> 894 <dd>
675 flag to debug into Python libraries 895 flag to debug into Python libraries
676 </dd> 896 </dd>
677 </dl><a NAME="DebugBase.trace_dispatch" ID="DebugBase.trace_dispatch"></a> 897 </dl>
898 <a NAME="DebugBase.trace_dispatch" ID="DebugBase.trace_dispatch"></a>
678 <h4>DebugBase.trace_dispatch</h4> 899 <h4>DebugBase.trace_dispatch</h4>
679 <b>trace_dispatch</b>(<i>frame, event, arg</i>) 900 <b>trace_dispatch</b>(<i>frame, event, arg</i>)
901
680 <p> 902 <p>
681 Public method reimplemented from bdb.py to do some special things. 903 Public method reimplemented from bdb.py to do some special things.
682 </p><p> 904 </p>
905 <p>
683 This specialty is to check the connection to the debug server 906 This specialty is to check the connection to the debug server
684 for new events (i.e. new breakpoints) while we are going through 907 for new events (i.e. new breakpoints) while we are going through
685 the code. 908 the code.
686 </p><dl> 909 </p>
910 <dl>
911
687 <dt><i>frame</i> (frame object)</dt> 912 <dt><i>frame</i> (frame object)</dt>
688 <dd> 913 <dd>
689 The current stack frame 914 The current stack frame
690 </dd><dt><i>event</i> (str)</dt> 915 </dd>
916 <dt><i>event</i> (str)</dt>
691 <dd> 917 <dd>
692 The trace event 918 The trace event
693 </dd><dt><i>arg</i> (depends on the previous event parameter)</dt> 919 </dd>
920 <dt><i>arg</i> (depends on the previous event parameter)</dt>
694 <dd> 921 <dd>
695 The arguments 922 The arguments
696 </dd> 923 </dd>
697 </dl><dl> 924 </dl>
925 <dl>
698 <dt>Returns:</dt> 926 <dt>Returns:</dt>
699 <dd> 927 <dd>
700 local trace function 928 local trace function
701 </dd> 929 </dd>
702 </dl><dl> 930 </dl>
931 <dl>
703 <dt>Return Type:</dt> 932 <dt>Return Type:</dt>
704 <dd> 933 <dd>
705 trace function or None 934 trace function or None
706 </dd> 935 </dd>
707 </dl><dl> 936 </dl>
937 <dl>
938
708 <dt>Raises <b>SystemExit</b>:</dt> 939 <dt>Raises <b>SystemExit</b>:</dt>
709 <dd> 940 <dd>
710 941
711 </dd> 942 </dd>
712 </dl><a NAME="DebugBase.user_exception" ID="DebugBase.user_exception"></a> 943 </dl>
944 <a NAME="DebugBase.user_exception" ID="DebugBase.user_exception"></a>
713 <h4>DebugBase.user_exception</h4> 945 <h4>DebugBase.user_exception</h4>
714 <b>user_exception</b>(<i>excinfo, unhandled=False</i>) 946 <b>user_exception</b>(<i>excinfo, unhandled=False</i>)
947
715 <p> 948 <p>
716 Public method reimplemented to report an exception to the debug server. 949 Public method reimplemented to report an exception to the debug server.
717 </p><dl> 950 </p>
951 <dl>
952
718 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt> 953 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt>
719 <dd> 954 <dd>
720 details about the exception 955 details about the exception
721 </dd><dt><i>unhandled=</i> (bool)</dt> 956 </dd>
957 <dt><i>unhandled=</i> (bool)</dt>
722 <dd> 958 <dd>
723 flag indicating an uncaught exception 959 flag indicating an uncaught exception
724 </dd> 960 </dd>
725 </dl><a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a> 961 </dl>
962 <a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a>
726 <h4>DebugBase.user_line</h4> 963 <h4>DebugBase.user_line</h4>
727 <b>user_line</b>(<i>frame</i>) 964 <b>user_line</b>(<i>frame</i>)
965
728 <p> 966 <p>
729 Public method reimplemented to handle the program about to execute a 967 Public method reimplemented to handle the program about to execute a
730 particular line. 968 particular line.
731 </p><dl> 969 </p>
970 <dl>
971
732 <dt><i>frame</i></dt> 972 <dt><i>frame</i></dt>
733 <dd> 973 <dd>
734 the frame object 974 the frame object
735 </dd> 975 </dd>
736 </dl> 976 </dl>
737 <div align="right"><a href="#top">Up</a></div> 977 <div align="right"><a href="#top">Up</a></div>
738 <hr /><hr /> 978 <hr />
979 <hr />
739 <a NAME="printerr" ID="printerr"></a> 980 <a NAME="printerr" ID="printerr"></a>
740 <h2>printerr</h2> 981 <h2>printerr</h2>
741 <b>printerr</b>(<i>s</i>) 982 <b>printerr</b>(<i>s</i>)
983
742 <p> 984 <p>
743 Module function used for debugging the debug client. 985 Module function used for debugging the debug client.
744 </p><dl> 986 </p>
987 <dl>
988
745 <dt><i>s</i></dt> 989 <dt><i>s</i></dt>
746 <dd> 990 <dd>
747 data to be printed 991 data to be printed
748 </dd> 992 </dd>
749 </dl> 993 </dl>
750 <div align="right"><a href="#top">Up</a></div> 994 <div align="right"><a href="#top">Up</a></div>
751 <hr /><hr /> 995 <hr />
996 <hr />
752 <a NAME="setRecursionLimit" ID="setRecursionLimit"></a> 997 <a NAME="setRecursionLimit" ID="setRecursionLimit"></a>
753 <h2>setRecursionLimit</h2> 998 <h2>setRecursionLimit</h2>
754 <b>setRecursionLimit</b>(<i>limit</i>) 999 <b>setRecursionLimit</b>(<i>limit</i>)
1000
755 <p> 1001 <p>
756 Module function to set the recursion limit. 1002 Module function to set the recursion limit.
757 </p><dl> 1003 </p>
1004 <dl>
1005
758 <dt><i>limit</i></dt> 1006 <dt><i>limit</i></dt>
759 <dd> 1007 <dd>
760 recursion limit (integer) 1008 recursion limit (integer)
761 </dd> 1009 </dd>
762 </dl> 1010 </dl>

eric ide

mercurial