Documentation/Source/eric4.DebugClients.Python3.DebugClientBase.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.DebugClients.Python3.DebugClientBase</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.DebugClients.Python3.DebugClientBase</h1>
24 <p>
25 Module implementing a debug client base class.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>DebugClientInstance</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#DebugClientBase">DebugClientBase</a></td>
35 <td>Class implementing the client side of the debugger.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr>
41 <td><a href="#DebugClientClose">DebugClientClose</a></td>
42 <td>Replacement for the standard os.close(fd).</td>
43 </tr><tr>
44 <td><a href="#DebugClientFork">DebugClientFork</a></td>
45 <td>Replacement for the standard os.fork().</td>
46 </tr><tr>
47 <td><a href="#DebugClientInput">DebugClientInput</a></td>
48 <td>Replacement for the standard input builtin.</td>
49 </tr><tr>
50 <td><a href="#DebugClientSetRecursionLimit">DebugClientSetRecursionLimit</a></td>
51 <td>Replacement for the standard sys.setrecursionlimit(limit).</td>
52 </tr>
53 </table>
54 <hr /><hr />
55 <a NAME="DebugClientBase" ID="DebugClientBase"></a>
56 <h2>DebugClientBase</h2>
57 <p>
58 Class implementing the client side of the debugger.
59 </p><p>
60 It provides access to the Python interpeter from a debugger running in another
61 process whether or not the Qt event loop is running.
62 </p><p>
63 The protocol between the debugger and the client assumes that there will be
64 a single source of debugger commands and a single source of Python
65 statements. Commands and statement are always exactly one line and may be
66 interspersed.
67 </p><p>
68 The protocol is as follows. First the client opens a connection to the
69 debugger and then sends a series of one line commands. A command is either
70 &gt;Load&lt;, &gt;Step&lt;, &gt;StepInto&lt;, ... or a Python statement.
71 See DebugProtocol.py for a listing of valid protocol tokens.
72 </p><p>
73 A Python statement consists of the statement to execute, followed (in a
74 separate line) by &gt;OK?&lt;. If the statement was incomplete then the response
75 is &gt;Continue&lt;. If there was an exception then the response is
76 &gt;Exception&lt;.
77 Otherwise the response is &gt;OK&lt;. The reason for the &gt;OK?&lt; part is to
78 provide a sentinal (ie. the responding &gt;OK&lt;) after any possible output as a
79 result of executing the command.
80 </p><p>
81 The client may send any other lines at any other time which should be
82 interpreted as program output.
83 </p><p>
84 If the debugger closes the session there is no response from the client.
85 The client may close the session at any time as a result of the script
86 being debugged closing or crashing.
87 </p><p>
88 <b>Note</b>: This class is meant to be subclassed by individual DebugClient classes.
89 Do not instantiate it directly.
90 </p>
91 <h3>Derived from</h3>
92 object
93 <h3>Class Attributes</h3>
94 <table>
95 <tr><td>clientCapabilities</td></tr>
96 </table>
97 <h3>Methods</h3>
98 <table>
99 <tr>
100 <td><a href="#DebugClientBase.__init__">DebugClientBase</a></td>
101 <td>Constructor</td>
102 </tr><tr>
103 <td><a href="#DebugClientBase.__clientCapabilities">__clientCapabilities</a></td>
104 <td>Private method to determine the clients capabilities.</td>
105 </tr><tr>
106 <td><a href="#DebugClientBase.__compileFileSource">__compileFileSource</a></td>
107 <td>Private method to compile source code read from a file.</td>
108 </tr><tr>
109 <td><a href="#DebugClientBase.__completionList">__completionList</a></td>
110 <td>Private slot to handle the request for a commandline completion list.</td>
111 </tr><tr>
112 <td><a href="#DebugClientBase.__dumpThreadList">__dumpThreadList</a></td>
113 <td>Public method to send the list of threads.</td>
114 </tr><tr>
115 <td><a href="#DebugClientBase.__dumpVariable">__dumpVariable</a></td>
116 <td>Private method to return the variables of a frame to the debug server.</td>
117 </tr><tr>
118 <td><a href="#DebugClientBase.__dumpVariables">__dumpVariables</a></td>
119 <td>Private method to return the variables of a frame to the debug server.</td>
120 </tr><tr>
121 <td><a href="#DebugClientBase.__exceptionRaised">__exceptionRaised</a></td>
122 <td>Private method called in the case of an exception</td>
123 </tr><tr>
124 <td><a href="#DebugClientBase.__formatQt4Variable">__formatQt4Variable</a></td>
125 <td>Private method to produce a formatted output of a simple Qt4 type.</td>
126 </tr><tr>
127 <td><a href="#DebugClientBase.__formatVariablesList">__formatVariablesList</a></td>
128 <td>Private method to produce a formated variables list.</td>
129 </tr><tr>
130 <td><a href="#DebugClientBase.__generateFilterObjects">__generateFilterObjects</a></td>
131 <td>Private slot to convert a filter string to a list of filter objects.</td>
132 </tr><tr>
133 <td><a href="#DebugClientBase.__interact">__interact</a></td>
134 <td>Private method to Interact with the debugger.</td>
135 </tr><tr>
136 <td><a href="#DebugClientBase.__resolveHost">__resolveHost</a></td>
137 <td>Private method to resolve a hostname to an IP address.</td>
138 </tr><tr>
139 <td><a href="#DebugClientBase.__setCoding">__setCoding</a></td>
140 <td>Private method to set the coding used by a python file.</td>
141 </tr><tr>
142 <td><a href="#DebugClientBase.__unhandled_exception">__unhandled_exception</a></td>
143 <td>Private method called to report an uncaught exception.</td>
144 </tr><tr>
145 <td><a href="#DebugClientBase.absPath">absPath</a></td>
146 <td>Public method to convert a filename to an absolute name.</td>
147 </tr><tr>
148 <td><a href="#DebugClientBase.attachThread">attachThread</a></td>
149 <td>Public method to setup a thread for DebugClient to debug.</td>
150 </tr><tr>
151 <td><a href="#DebugClientBase.close">close</a></td>
152 <td>Private method implementing a close method as a replacement for os.close().</td>
153 </tr><tr>
154 <td><a href="#DebugClientBase.connectDebugger">connectDebugger</a></td>
155 <td>Public method to establish a session with the debugger.</td>
156 </tr><tr>
157 <td><a href="#DebugClientBase.eventLoop">eventLoop</a></td>
158 <td>Public method implementing our event loop.</td>
159 </tr><tr>
160 <td><a href="#DebugClientBase.eventPoll">eventPoll</a></td>
161 <td>Public method to poll for events like 'set break point'.</td>
162 </tr><tr>
163 <td><a href="#DebugClientBase.fork">fork</a></td>
164 <td>Public method implementing a fork routine deciding which branch to follow.</td>
165 </tr><tr>
166 <td><a href="#DebugClientBase.getCoding">getCoding</a></td>
167 <td>Public method to return the current coding.</td>
168 </tr><tr>
169 <td><a href="#DebugClientBase.getRunning">getRunning</a></td>
170 <td>Public method to return the main script we are currently running.</td>
171 </tr><tr>
172 <td><a href="#DebugClientBase.handleLine">handleLine</a></td>
173 <td>Public method to handle the receipt of a complete line.</td>
174 </tr><tr>
175 <td><a href="#DebugClientBase.input">input</a></td>
176 <td>Public method to implement input() using the event loop.</td>
177 </tr><tr>
178 <td><a href="#DebugClientBase.main">main</a></td>
179 <td>Public method implementing the main method.</td>
180 </tr><tr>
181 <td><a href="#DebugClientBase.progTerminated">progTerminated</a></td>
182 <td>Public method to tell the debugger that the program has terminated.</td>
183 </tr><tr>
184 <td><a href="#DebugClientBase.run_call">run_call</a></td>
185 <td>Public method used to start the remote debugger and call a function.</td>
186 </tr><tr>
187 <td><a href="#DebugClientBase.sessionClose">sessionClose</a></td>
188 <td>Public method to close the session with the debugger and optionally terminate.</td>
189 </tr><tr>
190 <td><a href="#DebugClientBase.shouldSkip">shouldSkip</a></td>
191 <td>Public method to check if a file should be skipped.</td>
192 </tr><tr>
193 <td><a href="#DebugClientBase.startDebugger">startDebugger</a></td>
194 <td>Public method used to start the remote debugger.</td>
195 </tr><tr>
196 <td><a href="#DebugClientBase.startProgInDebugger">startProgInDebugger</a></td>
197 <td>Public method used to start the remote debugger.</td>
198 </tr><tr>
199 <td><a href="#DebugClientBase.write">write</a></td>
200 <td>Public method to write data to the output stream.</td>
201 </tr>
202 </table>
203 <a NAME="DebugClientBase.__init__" ID="DebugClientBase.__init__"></a>
204 <h4>DebugClientBase (Constructor)</h4>
205 <b>DebugClientBase</b>(<i></i>)
206 <p>
207 Constructor
208 </p><a NAME="DebugClientBase.__clientCapabilities" ID="DebugClientBase.__clientCapabilities"></a>
209 <h4>DebugClientBase.__clientCapabilities</h4>
210 <b>__clientCapabilities</b>(<i></i>)
211 <p>
212 Private method to determine the clients capabilities.
213 </p><dl>
214 <dt>Returns:</dt>
215 <dd>
216 client capabilities (integer)
217 </dd>
218 </dl><a NAME="DebugClientBase.__compileFileSource" ID="DebugClientBase.__compileFileSource"></a>
219 <h4>DebugClientBase.__compileFileSource</h4>
220 <b>__compileFileSource</b>(<i>filename, mode = 'exec'</i>)
221 <p>
222 Private method to compile source code read from a file.
223 </p><dl>
224 <dt><i>filename</i></dt>
225 <dd>
226 name of the source file (string)
227 </dd><dt><i>mode</i></dt>
228 <dd>
229 kind of code to be generated (string, exec or eval)
230 </dd>
231 </dl><dl>
232 <dt>Returns:</dt>
233 <dd>
234 compiled code object (None in case of errors)
235 </dd>
236 </dl><a NAME="DebugClientBase.__completionList" ID="DebugClientBase.__completionList"></a>
237 <h4>DebugClientBase.__completionList</h4>
238 <b>__completionList</b>(<i>text</i>)
239 <p>
240 Private slot to handle the request for a commandline completion list.
241 </p><dl>
242 <dt><i>text</i></dt>
243 <dd>
244 the text to be completed (string)
245 </dd>
246 </dl><a NAME="DebugClientBase.__dumpThreadList" ID="DebugClientBase.__dumpThreadList"></a>
247 <h4>DebugClientBase.__dumpThreadList</h4>
248 <b>__dumpThreadList</b>(<i></i>)
249 <p>
250 Public method to send the list of threads.
251 </p><a NAME="DebugClientBase.__dumpVariable" ID="DebugClientBase.__dumpVariable"></a>
252 <h4>DebugClientBase.__dumpVariable</h4>
253 <b>__dumpVariable</b>(<i>var, frmnr, scope, filter</i>)
254 <p>
255 Private method to return the variables of a frame to the debug server.
256 </p><dl>
257 <dt><i>var</i></dt>
258 <dd>
259 list encoded name of the requested variable (list of strings)
260 </dd><dt><i>frmnr</i></dt>
261 <dd>
262 distance of frame reported on. 0 is the current frame (int)
263 </dd><dt><i>scope</i></dt>
264 <dd>
265 1 to report global variables, 0 for local variables (int)
266 </dd><dt><i>filter</i></dt>
267 <dd>
268 the indices of variable types to be filtered (list of int)
269 </dd>
270 </dl><a NAME="DebugClientBase.__dumpVariables" ID="DebugClientBase.__dumpVariables"></a>
271 <h4>DebugClientBase.__dumpVariables</h4>
272 <b>__dumpVariables</b>(<i>frmnr, scope, filter</i>)
273 <p>
274 Private method to return the variables of a frame to the debug server.
275 </p><dl>
276 <dt><i>frmnr</i></dt>
277 <dd>
278 distance of frame reported on. 0 is the current frame (int)
279 </dd><dt><i>scope</i></dt>
280 <dd>
281 1 to report global variables, 0 for local variables (int)
282 </dd><dt><i>filter</i></dt>
283 <dd>
284 the indices of variable types to be filtered (list of int)
285 </dd>
286 </dl><a NAME="DebugClientBase.__exceptionRaised" ID="DebugClientBase.__exceptionRaised"></a>
287 <h4>DebugClientBase.__exceptionRaised</h4>
288 <b>__exceptionRaised</b>(<i></i>)
289 <p>
290 Private method called in the case of an exception
291 </p><p>
292 It ensures that the debug server is informed of the raised exception.
293 </p><a NAME="DebugClientBase.__formatQt4Variable" ID="DebugClientBase.__formatQt4Variable"></a>
294 <h4>DebugClientBase.__formatQt4Variable</h4>
295 <b>__formatQt4Variable</b>(<i>value, vtype</i>)
296 <p>
297 Private method to produce a formatted output of a simple Qt4 type.
298 </p><dl>
299 <dt><i>value</i></dt>
300 <dd>
301 variable to be formatted
302 </dd><dt><i>vtype</i></dt>
303 <dd>
304 type of the variable to be formatted (string)
305 </dd>
306 </dl><dl>
307 <dt>Returns:</dt>
308 <dd>
309 A tuple consisting of a list of formatted variables. Each
310 variable entry is a tuple of three elements, the variable name,
311 its type and value.
312 </dd>
313 </dl><a NAME="DebugClientBase.__formatVariablesList" ID="DebugClientBase.__formatVariablesList"></a>
314 <h4>DebugClientBase.__formatVariablesList</h4>
315 <b>__formatVariablesList</b>(<i>keylist, dict, scope, filter = [], formatSequences = False</i>)
316 <p>
317 Private method to produce a formated variables list.
318 </p><p>
319 The dictionary passed in to it is scanned. Variables are
320 only added to the list, if their type is not contained
321 in the filter list and their name doesn't match any of the filter expressions.
322 The formated variables list (a list of tuples of 3 values) is returned.
323 </p><dl>
324 <dt><i>keylist</i></dt>
325 <dd>
326 keys of the dictionary
327 </dd><dt><i>dict</i></dt>
328 <dd>
329 the dictionary to be scanned
330 </dd><dt><i>scope</i></dt>
331 <dd>
332 1 to filter using the globals filter, 0 using the locals
333 filter (int).
334 Variables are only added to the list, if their name do not match any of the
335 filter expressions.
336 </dd><dt><i>filter</i></dt>
337 <dd>
338 the indices of variable types to be filtered. Variables are
339 only added to the list, if their type is not contained in the filter
340 list.
341 </dd><dt><i>formatSequences</i></dt>
342 <dd>
343 flag indicating, that sequence or dictionary variables
344 should be formatted. If it is 0 (or false), just the number of items contained
345 in these variables is returned. (boolean)
346 </dd>
347 </dl><dl>
348 <dt>Returns:</dt>
349 <dd>
350 A tuple consisting of a list of formatted variables. Each variable
351 entry is a tuple of three elements, the variable name, its type and
352 value.
353 </dd>
354 </dl><a NAME="DebugClientBase.__generateFilterObjects" ID="DebugClientBase.__generateFilterObjects"></a>
355 <h4>DebugClientBase.__generateFilterObjects</h4>
356 <b>__generateFilterObjects</b>(<i>scope, filterString</i>)
357 <p>
358 Private slot to convert a filter string to a list of filter objects.
359 </p><dl>
360 <dt><i>scope</i></dt>
361 <dd>
362 1 to generate filter for global variables, 0 for local
363 variables (int)
364 </dd><dt><i>filterString</i></dt>
365 <dd>
366 string of filter patterns separated by ';'
367 </dd>
368 </dl><a NAME="DebugClientBase.__interact" ID="DebugClientBase.__interact"></a>
369 <h4>DebugClientBase.__interact</h4>
370 <b>__interact</b>(<i></i>)
371 <p>
372 Private method to Interact with the debugger.
373 </p><a NAME="DebugClientBase.__resolveHost" ID="DebugClientBase.__resolveHost"></a>
374 <h4>DebugClientBase.__resolveHost</h4>
375 <b>__resolveHost</b>(<i>host</i>)
376 <p>
377 Private method to resolve a hostname to an IP address.
378 </p><dl>
379 <dt><i>host</i></dt>
380 <dd>
381 hostname of the debug server (string)
382 </dd>
383 </dl><dl>
384 <dt>Returns:</dt>
385 <dd>
386 IP address (string)
387 </dd>
388 </dl><a NAME="DebugClientBase.__setCoding" ID="DebugClientBase.__setCoding"></a>
389 <h4>DebugClientBase.__setCoding</h4>
390 <b>__setCoding</b>(<i>filename</i>)
391 <p>
392 Private method to set the coding used by a python file.
393 </p><dl>
394 <dt><i>filename</i></dt>
395 <dd>
396 name of the file to inspect (string)
397 </dd>
398 </dl><a NAME="DebugClientBase.__unhandled_exception" ID="DebugClientBase.__unhandled_exception"></a>
399 <h4>DebugClientBase.__unhandled_exception</h4>
400 <b>__unhandled_exception</b>(<i>exctype, excval, exctb</i>)
401 <p>
402 Private method called to report an uncaught exception.
403 </p><dl>
404 <dt><i>exctype</i></dt>
405 <dd>
406 the type of the exception
407 </dd><dt><i>excval</i></dt>
408 <dd>
409 data about the exception
410 </dd><dt><i>exctb</i></dt>
411 <dd>
412 traceback for the exception
413 </dd>
414 </dl><a NAME="DebugClientBase.absPath" ID="DebugClientBase.absPath"></a>
415 <h4>DebugClientBase.absPath</h4>
416 <b>absPath</b>(<i>fn</i>)
417 <p>
418 Public method to convert a filename to an absolute name.
419 </p><p>
420 sys.path is used as a set of possible prefixes. The name stays
421 relative if a file could not be found.
422 </p><dl>
423 <dt><i>fn</i></dt>
424 <dd>
425 filename (string)
426 </dd>
427 </dl><dl>
428 <dt>Returns:</dt>
429 <dd>
430 the converted filename (string)
431 </dd>
432 </dl><a NAME="DebugClientBase.attachThread" ID="DebugClientBase.attachThread"></a>
433 <h4>DebugClientBase.attachThread</h4>
434 <b>attachThread</b>(<i>target = None, args = None, kwargs = None, mainThread = False</i>)
435 <p>
436 Public method to setup a thread for DebugClient to debug.
437 </p><p>
438 If mainThread is non-zero, then we are attaching to the already
439 started mainthread of the app and the rest of the args are ignored.
440 </p><dl>
441 <dt><i>target</i></dt>
442 <dd>
443 the start function of the target thread (i.e. the user code)
444 </dd><dt><i>args</i></dt>
445 <dd>
446 arguments to pass to target
447 </dd><dt><i>kwargs</i></dt>
448 <dd>
449 keyword arguments to pass to target
450 </dd><dt><i>mainThread</i></dt>
451 <dd>
452 True, if we are attaching to the already
453 started mainthread of the app
454 </dd>
455 </dl><dl>
456 <dt>Returns:</dt>
457 <dd>
458 The identifier of the created thread
459 </dd>
460 </dl><a NAME="DebugClientBase.close" ID="DebugClientBase.close"></a>
461 <h4>DebugClientBase.close</h4>
462 <b>close</b>(<i>fd</i>)
463 <p>
464 Private method implementing a close method as a replacement for os.close().
465 </p><p>
466 It prevents the debugger connections from being closed.
467 </p><dl>
468 <dt><i>fd</i></dt>
469 <dd>
470 file descriptor to be closed (integer)
471 </dd>
472 </dl><a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a>
473 <h4>DebugClientBase.connectDebugger</h4>
474 <b>connectDebugger</b>(<i>port, remoteAddress = None, redirect = True</i>)
475 <p>
476 Public method to establish a session with the debugger.
477 </p><p>
478 It opens a network connection to the debugger, connects it to stdin,
479 stdout and stderr and saves these file objects in case the application
480 being debugged redirects them itself.
481 </p><dl>
482 <dt><i>port</i></dt>
483 <dd>
484 the port number to connect to (int)
485 </dd><dt><i>remoteAddress</i></dt>
486 <dd>
487 the network address of the debug server host (string)
488 </dd><dt><i>redirect</i></dt>
489 <dd>
490 flag indicating redirection of stdin, stdout and stderr (boolean)
491 </dd>
492 </dl><a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a>
493 <h4>DebugClientBase.eventLoop</h4>
494 <b>eventLoop</b>(<i>disablePolling = False</i>)
495 <p>
496 Public method implementing our event loop.
497 </p><dl>
498 <dt><i>disablePolling</i></dt>
499 <dd>
500 flag indicating to enter an event loop with
501 polling disabled (boolean)
502 </dd>
503 </dl><a NAME="DebugClientBase.eventPoll" ID="DebugClientBase.eventPoll"></a>
504 <h4>DebugClientBase.eventPoll</h4>
505 <b>eventPoll</b>(<i></i>)
506 <p>
507 Public method to poll for events like 'set break point'.
508 </p><a NAME="DebugClientBase.fork" ID="DebugClientBase.fork"></a>
509 <h4>DebugClientBase.fork</h4>
510 <b>fork</b>(<i></i>)
511 <p>
512 Public method implementing a fork routine deciding which branch to follow.
513 </p><a NAME="DebugClientBase.getCoding" ID="DebugClientBase.getCoding"></a>
514 <h4>DebugClientBase.getCoding</h4>
515 <b>getCoding</b>(<i></i>)
516 <p>
517 Public method to return the current coding.
518 </p><dl>
519 <dt>Returns:</dt>
520 <dd>
521 codec name (string)
522 </dd>
523 </dl><a NAME="DebugClientBase.getRunning" ID="DebugClientBase.getRunning"></a>
524 <h4>DebugClientBase.getRunning</h4>
525 <b>getRunning</b>(<i></i>)
526 <p>
527 Public method to return the main script we are currently running.
528 </p><a NAME="DebugClientBase.handleLine" ID="DebugClientBase.handleLine"></a>
529 <h4>DebugClientBase.handleLine</h4>
530 <b>handleLine</b>(<i>line</i>)
531 <p>
532 Public method to handle the receipt of a complete line.
533 </p><p>
534 It first looks for a valid protocol token at the start of the line. Thereafter
535 it trys to execute the lines accumulated so far.
536 </p><dl>
537 <dt><i>line</i></dt>
538 <dd>
539 the received line
540 </dd>
541 </dl><a NAME="DebugClientBase.input" ID="DebugClientBase.input"></a>
542 <h4>DebugClientBase.input</h4>
543 <b>input</b>(<i>prompt, echo</i>)
544 <p>
545 Public method to implement input() using the event loop.
546 </p><dl>
547 <dt><i>prompt</i></dt>
548 <dd>
549 the prompt to be shown (string)
550 </dd><dt><i>echo</i></dt>
551 <dd>
552 Flag indicating echoing of the input (boolean)
553 </dd>
554 </dl><dl>
555 <dt>Returns:</dt>
556 <dd>
557 the entered string
558 </dd>
559 </dl><a NAME="DebugClientBase.main" ID="DebugClientBase.main"></a>
560 <h4>DebugClientBase.main</h4>
561 <b>main</b>(<i></i>)
562 <p>
563 Public method implementing the main method.
564 </p><a NAME="DebugClientBase.progTerminated" ID="DebugClientBase.progTerminated"></a>
565 <h4>DebugClientBase.progTerminated</h4>
566 <b>progTerminated</b>(<i>status</i>)
567 <p>
568 Public method to tell the debugger that the program has terminated.
569 </p><dl>
570 <dt><i>status</i></dt>
571 <dd>
572 the return status
573 </dd>
574 </dl><a NAME="DebugClientBase.run_call" ID="DebugClientBase.run_call"></a>
575 <h4>DebugClientBase.run_call</h4>
576 <b>run_call</b>(<i>scriptname, func, *args</i>)
577 <p>
578 Public method used to start the remote debugger and call a function.
579 </p><dl>
580 <dt><i>scriptname</i></dt>
581 <dd>
582 name of the script to be debugged (string)
583 </dd><dt><i>func</i></dt>
584 <dd>
585 function to be called
586 </dd><dt><i>*args</i></dt>
587 <dd>
588 arguments being passed to func
589 </dd>
590 </dl><dl>
591 <dt>Returns:</dt>
592 <dd>
593 result of the function call
594 </dd>
595 </dl><a NAME="DebugClientBase.sessionClose" ID="DebugClientBase.sessionClose"></a>
596 <h4>DebugClientBase.sessionClose</h4>
597 <b>sessionClose</b>(<i>exit = True</i>)
598 <p>
599 Public method to close the session with the debugger and optionally terminate.
600 </p><dl>
601 <dt><i>exit</i></dt>
602 <dd>
603 flag indicating to terminate (boolean)
604 </dd>
605 </dl><a NAME="DebugClientBase.shouldSkip" ID="DebugClientBase.shouldSkip"></a>
606 <h4>DebugClientBase.shouldSkip</h4>
607 <b>shouldSkip</b>(<i>fn</i>)
608 <p>
609 Public method to check if a file should be skipped.
610 </p><dl>
611 <dt><i>fn</i></dt>
612 <dd>
613 filename to be checked
614 </dd>
615 </dl><dl>
616 <dt>Returns:</dt>
617 <dd>
618 non-zero if fn represents a file we are 'skipping', zero otherwise.
619 </dd>
620 </dl><a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a>
621 <h4>DebugClientBase.startDebugger</h4>
622 <b>startDebugger</b>(<i>filename = None, host = None, port = None, enableTrace = True, exceptions = True, tracePython = False, redirect = True</i>)
623 <p>
624 Public method used to start the remote debugger.
625 </p><dl>
626 <dt><i>filename</i></dt>
627 <dd>
628 the program to be debugged (string)
629 </dd><dt><i>host</i></dt>
630 <dd>
631 hostname of the debug server (string)
632 </dd><dt><i>port</i></dt>
633 <dd>
634 portnumber of the debug server (int)
635 </dd><dt><i>enableTrace</i></dt>
636 <dd>
637 flag to enable the tracing function (boolean)
638 </dd><dt><i>exceptions</i></dt>
639 <dd>
640 flag to enable exception reporting of the IDE (boolean)
641 </dd><dt><i>tracePython</i></dt>
642 <dd>
643 flag to enable tracing into the Python library (boolean)
644 </dd><dt><i>redirect</i></dt>
645 <dd>
646 flag indicating redirection of stdin, stdout and stderr (boolean)
647 </dd>
648 </dl><a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a>
649 <h4>DebugClientBase.startProgInDebugger</h4>
650 <b>startProgInDebugger</b>(<i>progargs, wd = '', host = None, port = None, exceptions = True, tracePython = False, redirect = True</i>)
651 <p>
652 Public method used to start the remote debugger.
653 </p><dl>
654 <dt><i>progargs</i></dt>
655 <dd>
656 commandline for the program to be debugged
657 (list of strings)
658 </dd><dt><i>wd</i></dt>
659 <dd>
660 working directory for the program execution (string)
661 </dd><dt><i>host</i></dt>
662 <dd>
663 hostname of the debug server (string)
664 </dd><dt><i>port</i></dt>
665 <dd>
666 portnumber of the debug server (int)
667 </dd><dt><i>exceptions</i></dt>
668 <dd>
669 flag to enable exception reporting of the IDE (boolean)
670 </dd><dt><i>tracePython</i></dt>
671 <dd>
672 flag to enable tracing into the Python library (boolean)
673 </dd><dt><i>redirect</i></dt>
674 <dd>
675 flag indicating redirection of stdin, stdout and stderr (boolean)
676 </dd>
677 </dl><a NAME="DebugClientBase.write" ID="DebugClientBase.write"></a>
678 <h4>DebugClientBase.write</h4>
679 <b>write</b>(<i>s</i>)
680 <p>
681 Public method to write data to the output stream.
682 </p><dl>
683 <dt><i>s</i></dt>
684 <dd>
685 data to be written (string)
686 </dd>
687 </dl>
688 <div align="right"><a href="#top">Up</a></div>
689 <hr /><hr />
690 <a NAME="DebugClientClose" ID="DebugClientClose"></a>
691 <h2>DebugClientClose</h2>
692 <b>DebugClientClose</b>(<i>fd</i>)
693 <p>
694 Replacement for the standard os.close(fd).
695 </p><dl>
696 <dt><i>fd</i></dt>
697 <dd>
698 open file descriptor to be closed (integer)
699 </dd>
700 </dl>
701 <div align="right"><a href="#top">Up</a></div>
702 <hr /><hr />
703 <a NAME="DebugClientFork" ID="DebugClientFork"></a>
704 <h2>DebugClientFork</h2>
705 <b>DebugClientFork</b>(<i></i>)
706 <p>
707 Replacement for the standard os.fork().
708 </p>
709 <div align="right"><a href="#top">Up</a></div>
710 <hr /><hr />
711 <a NAME="DebugClientInput" ID="DebugClientInput"></a>
712 <h2>DebugClientInput</h2>
713 <b>DebugClientInput</b>(<i>prompt = ""</i>)
714 <p>
715 Replacement for the standard input builtin.
716 </p><p>
717 This function works with the split debugger.
718 </p><dl>
719 <dt><i>prompt</i></dt>
720 <dd>
721 The prompt to be shown. (string)
722 </dd>
723 </dl>
724 <div align="right"><a href="#top">Up</a></div>
725 <hr /><hr />
726 <a NAME="DebugClientSetRecursionLimit" ID="DebugClientSetRecursionLimit"></a>
727 <h2>DebugClientSetRecursionLimit</h2>
728 <b>DebugClientSetRecursionLimit</b>(<i>limit</i>)
729 <p>
730 Replacement for the standard sys.setrecursionlimit(limit).
731 </p><dl>
732 <dt><i>limit</i></dt>
733 <dd>
734 recursion limit (integer)
735 </dd>
736 </dl>
737 <div align="right"><a href="#top">Up</a></div>
738 <hr />
739 </body></html>

eric ide

mercurial