Documentation/Source/eric5.DebugClients.Python.DebugClientBase.html

changeset 945
8cd4d08fa9f6
parent 440
69ace3e2dcf6
child 1228
7afaf2fca55b
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
68 statements. Commands and statement are always exactly one line and may be 68 statements. Commands and statement are always exactly one line and may be
69 interspersed. 69 interspersed.
70 </p><p> 70 </p><p>
71 The protocol is as follows. First the client opens a connection to the 71 The protocol is as follows. First the client opens a connection to the
72 debugger and then sends a series of one line commands. A command is either 72 debugger and then sends a series of one line commands. A command is either
73 &gt;Load&lt;, &gt;Step&lt;, &gt;StepInto&lt;, ... or a Python statement. 73 &gt;Load&lt;, &gt;Step&lt;, &gt;StepInto&lt;, ... or a Python statement.
74 See DebugProtocol.py for a listing of valid protocol tokens. 74 See DebugProtocol.py for a listing of valid protocol tokens.
75 </p><p> 75 </p><p>
76 A Python statement consists of the statement to execute, followed (in a 76 A Python statement consists of the statement to execute, followed (in a
77 separate line) by &gt;OK?&lt;. If the statement was incomplete then the response 77 separate line) by &gt;OK?&lt;. If the statement was incomplete then the response
78 is &gt;Continue&lt;. If there was an exception then the response is 78 is &gt;Continue&lt;. If there was an exception then the response is
79 &gt;Exception&lt;. 79 &gt;Exception&lt;.
80 Otherwise the response is &gt;OK&lt;. The reason for the &gt;OK?&lt; part is to 80 Otherwise the response is &gt;OK&lt;. The reason for the &gt;OK?&lt; part is to
81 provide a sentinal (ie. the responding &gt;OK&lt;) after any possible output as a 81 provide a sentinal (ie. the responding &gt;OK&lt;) after any possible output as a
82 result of executing the command. 82 result of executing the command.
83 </p><p> 83 </p><p>
293 </dd> 293 </dd>
294 </dl><dl> 294 </dl><dl>
295 <dt>Returns:</dt> 295 <dt>Returns:</dt>
296 <dd> 296 <dd>
297 A tuple consisting of a list of formatted variables. Each 297 A tuple consisting of a list of formatted variables. Each
298 variable entry is a tuple of three elements, the variable name, 298 variable entry is a tuple of three elements, the variable name,
299 its type and value. 299 its type and value.
300 </dd> 300 </dd>
301 </dl><a NAME="DebugClientBase.__formatVariablesList" ID="DebugClientBase.__formatVariablesList"></a> 301 </dl><a NAME="DebugClientBase.__formatVariablesList" ID="DebugClientBase.__formatVariablesList"></a>
302 <h4>DebugClientBase.__formatVariablesList</h4> 302 <h4>DebugClientBase.__formatVariablesList</h4>
303 <b>__formatVariablesList</b>(<i>keylist, dict, scope, filter = [], formatSequences = 0</i>) 303 <b>__formatVariablesList</b>(<i>keylist, dict, scope, filter=[], formatSequences=0</i>)
304 <p> 304 <p>
305 Private method to produce a formated variables list. 305 Private method to produce a formated variables list.
306 </p><p> 306 </p><p>
307 The dictionary passed in to it is scanned. Variables are 307 The dictionary passed in to it is scanned. Variables are
308 only added to the list, if their type is not contained 308 only added to the list, if their type is not contained
309 in the filter list and their name doesn't match any of the filter expressions. 309 in the filter list and their name doesn't match any of the filter expressions.
310 The formated variables list (a list of tuples of 3 values) is returned. 310 The formated variables list (a list of tuples of 3 values) is returned.
311 </p><dl> 311 </p><dl>
312 <dt><i>keylist</i></dt> 312 <dt><i>keylist</i></dt>
313 <dd> 313 <dd>
322 Variables are only added to the list, if their name do not match any of the 322 Variables are only added to the list, if their name do not match any of the
323 filter expressions. 323 filter expressions.
324 </dd><dt><i>filter</i></dt> 324 </dd><dt><i>filter</i></dt>
325 <dd> 325 <dd>
326 the indices of variable types to be filtered. Variables are 326 the indices of variable types to be filtered. Variables are
327 only added to the list, if their type is not contained in the filter 327 only added to the list, if their type is not contained in the filter
328 list. 328 list.
329 </dd><dt><i>formatSequences</i></dt> 329 </dd><dt><i>formatSequences</i></dt>
330 <dd> 330 <dd>
331 flag indicating, that sequence or dictionary variables 331 flag indicating, that sequence or dictionary variables
332 should be formatted. If it is 0 (or false), just the number of items contained 332 should be formatted. If it is 0 (or false), just the number of items contained
334 </dd> 334 </dd>
335 </dl><dl> 335 </dl><dl>
336 <dt>Returns:</dt> 336 <dt>Returns:</dt>
337 <dd> 337 <dd>
338 A tuple consisting of a list of formatted variables. Each variable 338 A tuple consisting of a list of formatted variables. Each variable
339 entry is a tuple of three elements, the variable name, its type and 339 entry is a tuple of three elements, the variable name, its type and
340 value. 340 value.
341 </dd> 341 </dd>
342 </dl><a NAME="DebugClientBase.__generateFilterObjects" ID="DebugClientBase.__generateFilterObjects"></a> 342 </dl><a NAME="DebugClientBase.__generateFilterObjects" ID="DebugClientBase.__generateFilterObjects"></a>
343 <h4>DebugClientBase.__generateFilterObjects</h4> 343 <h4>DebugClientBase.__generateFilterObjects</h4>
344 <b>__generateFilterObjects</b>(<i>scope, filterString</i>) 344 <b>__generateFilterObjects</b>(<i>scope, filterString</i>)
355 </dd> 355 </dd>
356 </dl><a NAME="DebugClientBase.__getSysPath" ID="DebugClientBase.__getSysPath"></a> 356 </dl><a NAME="DebugClientBase.__getSysPath" ID="DebugClientBase.__getSysPath"></a>
357 <h4>DebugClientBase.__getSysPath</h4> 357 <h4>DebugClientBase.__getSysPath</h4>
358 <b>__getSysPath</b>(<i>firstEntry</i>) 358 <b>__getSysPath</b>(<i>firstEntry</i>)
359 <p> 359 <p>
360 Private slot to calculate a path list including the PYTHONPATH 360 Private slot to calculate a path list including the PYTHONPATH
361 environment variable. 361 environment variable.
362 </p><dl> 362 </p><dl>
363 <dt><i>firstEntry</i></dt> 363 <dt><i>firstEntry</i></dt>
364 <dd> 364 <dd>
365 entry to be put first in sys.path (string) 365 entry to be put first in sys.path (string)
419 <h4>DebugClientBase.absPath</h4> 419 <h4>DebugClientBase.absPath</h4>
420 <b>absPath</b>(<i>fn</i>) 420 <b>absPath</b>(<i>fn</i>)
421 <p> 421 <p>
422 Public method to convert a filename to an absolute name. 422 Public method to convert a filename to an absolute name.
423 </p><p> 423 </p><p>
424 sys.path is used as a set of possible prefixes. The name stays 424 sys.path is used as a set of possible prefixes. The name stays
425 relative if a file could not be found. 425 relative if a file could not be found.
426 </p><dl> 426 </p><dl>
427 <dt><i>fn</i></dt> 427 <dt><i>fn</i></dt>
428 <dd> 428 <dd>
429 filename (string) 429 filename (string)
433 <dd> 433 <dd>
434 the converted filename (string) 434 the converted filename (string)
435 </dd> 435 </dd>
436 </dl><a NAME="DebugClientBase.attachThread" ID="DebugClientBase.attachThread"></a> 436 </dl><a NAME="DebugClientBase.attachThread" ID="DebugClientBase.attachThread"></a>
437 <h4>DebugClientBase.attachThread</h4> 437 <h4>DebugClientBase.attachThread</h4>
438 <b>attachThread</b>(<i>target = None, args = None, kwargs = None, mainThread = 0</i>) 438 <b>attachThread</b>(<i>target=None, args=None, kwargs=None, mainThread=0</i>)
439 <p> 439 <p>
440 Public method to setup a thread for DebugClient to debug. 440 Public method to setup a thread for DebugClient to debug.
441 </p><p> 441 </p><p>
442 If mainThread is non-zero, then we are attaching to the already 442 If mainThread is non-zero, then we are attaching to the already
443 started mainthread of the app and the rest of the args are ignored. 443 started mainthread of the app and the rest of the args are ignored.
444 </p><p> 444 </p><p>
445 This is just an empty function and is overridden in the threaded 445 This is just an empty function and is overridden in the threaded
446 debugger. 446 debugger.
447 </p><dl> 447 </p><dl>
478 </dd> 478 </dd>
479 </dl><a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a> 479 </dl><a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a>
480 <h4>DebugClientBase.connectDebugger</h4> 480 <h4>DebugClientBase.connectDebugger</h4>
481 <b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=1</i>) 481 <b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=1</i>)
482 <p> 482 <p>
483 Public method to establish a session with the debugger. 483 Public method to establish a session with the debugger.
484 </p><p> 484 </p><p>
485 It opens a network connection to the debugger, connects it to stdin, 485 It opens a network connection to the debugger, connects it to stdin,
486 stdout and stderr and saves these file objects in case the application 486 stdout and stderr and saves these file objects in case the application
487 being debugged redirects them itself. 487 being debugged redirects them itself.
488 </p><dl> 488 </p><dl>
489 <dt><i>port</i></dt> 489 <dt><i>port</i></dt>
490 <dd> 490 <dd>
496 <dd> 496 <dd>
497 flag indicating redirection of stdin, stdout and stderr (boolean) 497 flag indicating redirection of stdin, stdout and stderr (boolean)
498 </dd> 498 </dd>
499 </dl><a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a> 499 </dl><a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a>
500 <h4>DebugClientBase.eventLoop</h4> 500 <h4>DebugClientBase.eventLoop</h4>
501 <b>eventLoop</b>(<i>disablePolling = False</i>) 501 <b>eventLoop</b>(<i>disablePolling=False</i>)
502 <p> 502 <p>
503 Public method implementing our event loop. 503 Public method implementing our event loop.
504 </p><dl> 504 </p><dl>
505 <dt><i>disablePolling</i></dt> 505 <dt><i>disablePolling</i></dt>
506 <dd> 506 <dd>
614 <dd> 614 <dd>
615 result of the function call 615 result of the function call
616 </dd> 616 </dd>
617 </dl><a NAME="DebugClientBase.sessionClose" ID="DebugClientBase.sessionClose"></a> 617 </dl><a NAME="DebugClientBase.sessionClose" ID="DebugClientBase.sessionClose"></a>
618 <h4>DebugClientBase.sessionClose</h4> 618 <h4>DebugClientBase.sessionClose</h4>
619 <b>sessionClose</b>(<i>exit = 1</i>) 619 <b>sessionClose</b>(<i>exit=1</i>)
620 <p> 620 <p>
621 Public method to close the session with the debugger and optionally terminate. 621 Public method to close the session with the debugger and optionally terminate.
622 </p><dl> 622 </p><dl>
623 <dt><i>exit</i></dt> 623 <dt><i>exit</i></dt>
624 <dd> 624 <dd>
639 <dd> 639 <dd>
640 non-zero if fn represents a file we are 'skipping', zero otherwise. 640 non-zero if fn represents a file we are 'skipping', zero otherwise.
641 </dd> 641 </dd>
642 </dl><a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a> 642 </dl><a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a>
643 <h4>DebugClientBase.startDebugger</h4> 643 <h4>DebugClientBase.startDebugger</h4>
644 <b>startDebugger</b>(<i>filename = None, host = None, port = None, enableTrace = 1, exceptions = 1, tracePython = 0, redirect = 1</i>) 644 <b>startDebugger</b>(<i>filename=None, host=None, port=None, enableTrace=1, exceptions=1, tracePython=0, redirect=1</i>)
645 <p> 645 <p>
646 Public method used to start the remote debugger. 646 Public method used to start the remote debugger.
647 </p><dl> 647 </p><dl>
648 <dt><i>filename</i></dt> 648 <dt><i>filename</i></dt>
649 <dd> 649 <dd>
667 <dd> 667 <dd>
668 flag indicating redirection of stdin, stdout and stderr (boolean) 668 flag indicating redirection of stdin, stdout and stderr (boolean)
669 </dd> 669 </dd>
670 </dl><a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a> 670 </dl><a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a>
671 <h4>DebugClientBase.startProgInDebugger</h4> 671 <h4>DebugClientBase.startProgInDebugger</h4>
672 <b>startProgInDebugger</b>(<i>progargs, wd = '', host = None, port = None, exceptions = 1, tracePython = 0, redirect = 1</i>) 672 <b>startProgInDebugger</b>(<i>progargs, wd='', host=None, port=None, exceptions=1, tracePython=0, redirect=1</i>)
673 <p> 673 <p>
674 Public method used to start the remote debugger. 674 Public method used to start the remote debugger.
675 </p><dl> 675 </p><dl>
676 <dt><i>progargs</i></dt> 676 <dt><i>progargs</i></dt>
677 <dd> 677 <dd>

eric ide

mercurial