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

branch
maintenance
changeset 8043
0acf98cd089a
parent 7989
a21d673a8f99
child 8215
fc5d68a6889e
--- a/eric6/Documentation/Source/eric6.DebugClients.Python.DebugClientBase.html	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Documentation/Source/eric6.DebugClients.Python.DebugClientBase.html	Mon Feb 01 10:38:16 2021 +0100
@@ -48,10 +48,6 @@
 <td>Replacement for the standard os.close(fd).</td>
 </tr>
 <tr>
-<td><a href="#DebugClientFork">DebugClientFork</a></td>
-<td>Replacement for the standard os.fork().</td>
-</tr>
-<tr>
 <td><a href="#DebugClientInput">DebugClientInput</a></td>
 <td>Replacement for the standard input() builtin.</td>
 </tr>
@@ -115,6 +111,10 @@
 <td>Private method to determine the clients capabilities.</td>
 </tr>
 <tr>
+<td><a href="#DebugClientBase.__compileCommand">__compileCommand</a></td>
+<td>Private method to compile source code.</td>
+</tr>
+<tr>
 <td><a href="#DebugClientBase.__compileFileSource">__compileFileSource</a></td>
 <td>Private method to compile source code read from a file.</td>
 </tr>
@@ -199,10 +199,6 @@
 <td>Public method to poll for events like 'set break point'.</td>
 </tr>
 <tr>
-<td><a href="#DebugClientBase.fork">fork</a></td>
-<td>Public method implementing a fork routine deciding which branch to follow.</td>
-</tr>
-<tr>
 <td><a href="#DebugClientBase.getCoding">getCoding</a></td>
 <td>Public method to return the current coding.</td>
 </tr>
@@ -247,6 +243,10 @@
 <td>Public method to signal the deletion of a temporary watch expression.</td>
 </tr>
 <tr>
+<td><a href="#DebugClientBase.sendDebuggerId">sendDebuggerId</a></td>
+<td>Public method to send the debug client id.</td>
+</tr>
+<tr>
 <td><a href="#DebugClientBase.sendException">sendException</a></td>
 <td>Public method to send information for an exception.</td>
 </tr>
@@ -275,6 +275,10 @@
 <td>Public method to store a disassembly of the code object raising an exception.</td>
 </tr>
 <tr>
+<td><a href="#DebugClientBase.skipMultiProcessDebugging">skipMultiProcessDebugging</a></td>
+<td>Public method to check, if the given script is eligible for debugging.</td>
+</tr>
+<tr>
 <td><a href="#DebugClientBase.startDebugger">startDebugger</a></td>
 <td>Public method used to start the remote debugger.</td>
 </tr>
@@ -320,7 +324,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 list of tuples containing the test case ID, a short description
             and the path of the test file name
@@ -340,11 +344,39 @@
         Private method to determine the clients capabilities.
 </p>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 client capabilities (integer)
 </dd>
 </dl>
+<a NAME="DebugClientBase.__compileCommand" ID="DebugClientBase.__compileCommand"></a>
+<h4>DebugClientBase.__compileCommand</h4>
+<b>__compileCommand</b>(<i>statement, filename="<string>", mode="exec"</i>)
+
+<p>
+        Private method to compile source code.
+</p>
+<dl>
+
+<dt><i>statement</i> (str)</dt>
+<dd>
+source code string to be compiled
+</dd>
+<dt><i>filename</i> (str)</dt>
+<dd>
+name of the source file
+</dd>
+<dt><i>mode</i> (str)</dt>
+<dd>
+kind of code to be generated (exec or eval)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+compiled code object (None in case of errors)
+</dd>
+</dl>
 <a NAME="DebugClientBase.__compileFileSource" ID="DebugClientBase.__compileFileSource"></a>
 <h4>DebugClientBase.__compileFileSource</h4>
 <b>__compileFileSource</b>(<i>filename, mode='exec'</i>)
@@ -354,17 +386,17 @@
 </p>
 <dl>
 
-<dt><i>filename</i></dt>
+<dt><i>filename</i> (str)</dt>
 <dd>
-name of the source file (string)
+name of the source file
 </dd>
-<dt><i>mode</i></dt>
+<dt><i>mode</i> (str)</dt>
 <dd>
-kind of code to be generated (string, exec or eval)
+kind of code to be generated (exec or eval)
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 compiled code object (None in case of errors)
 </dd>
@@ -392,7 +424,7 @@
 </p>
 <dl>
 
-<dt><i>var</i> (list of strings)</dt>
+<dt><i>var</i> (list of str)</dt>
 <dd>
 list encoded name of the requested variable
 </dd>
@@ -406,7 +438,7 @@
 </dd>
 <dt><i>filterList</i> (list of int)</dt>
 <dd>
-the indices of variable types to be filtered
+list of variable types to be filtered
 </dd>
 </dl>
 <a NAME="DebugClientBase.__dumpVariables" ID="DebugClientBase.__dumpVariables"></a>
@@ -426,9 +458,9 @@
 <dd>
 1 to report global variables, 0 for local variables
 </dd>
-<dt><i>filterList</i> (list of int)</dt>
+<dt><i>filterList</i> (list of str)</dt>
 <dd>
-the indices of variable types to be filtered
+list of variable types to be filtered
 </dd>
 </dl>
 <a NAME="DebugClientBase.__extractIndicators" ID="DebugClientBase.__extractIndicators"></a>
@@ -446,7 +478,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 tuple containing the variable text without indicators and the
             indicator string
@@ -477,7 +509,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 A tuple consisting of a list of formatted variables. Each
             variable entry is a tuple of three elements, the variable name,
@@ -511,15 +543,15 @@
             Variables are only added to the list, if their name do not match
             any of the filter expressions.
 </dd>
-<dt><i>filterList</i> (list of int)</dt>
+<dt><i>filterList</i> (list of str)</dt>
 <dd>
-the indices of variable types to be filtered.
+list of variable types to be filtered.
             Variables are only added to the list, if their type is not
             contained in the filter list.
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 A tuple consisting of a list of formatted variables. Each
             variable entry is a tuple of three elements, the variable name,
@@ -589,7 +621,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 path list for use as sys.path (list of strings)
 </dd>
@@ -623,7 +655,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 IP address (string)
 </dd>
@@ -701,7 +733,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 the converted filename (string)
 </dd>
@@ -726,7 +758,7 @@
 </dl>
 <a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a>
 <h4>DebugClientBase.connectDebugger</h4>
-<b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=True</i>)
+<b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=True, name=""</i>)
 
 <p>
         Public method to establish a session with the debugger.
@@ -738,19 +770,22 @@
 </p>
 <dl>
 
-<dt><i>port</i></dt>
+<dt><i>port</i> (int)</dt>
 <dd>
-the port number to connect to (int)
+the port number to connect to
 </dd>
-<dt><i>remoteAddress</i></dt>
+<dt><i>remoteAddress</i> (str)</dt>
 <dd>
 the network address of the debug server host
-            (string)
 </dd>
-<dt><i>redirect</i></dt>
+<dt><i>redirect</i> (bool)</dt>
 <dd>
 flag indicating redirection of stdin, stdout and
-            stderr (boolean)
+            stderr
+</dd>
+<dt><i>name</i> (str)</dt>
+<dd>
+name to be attached to the debugger ID
 </dd>
 </dl>
 <a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a>
@@ -775,20 +810,6 @@
 <p>
         Public method to poll for events like 'set break point'.
 </p>
-<a NAME="DebugClientBase.fork" ID="DebugClientBase.fork"></a>
-<h4>DebugClientBase.fork</h4>
-<b>fork</b>(<i></i>)
-
-<p>
-        Public method implementing a fork routine deciding which branch
-        to follow.
-</p>
-<dl>
-<dt>Returns:</dt>
-<dd>
-process ID (integer)
-</dd>
-</dl>
 <a NAME="DebugClientBase.getCoding" ID="DebugClientBase.getCoding"></a>
 <h4>DebugClientBase.getCoding</h4>
 <b>getCoding</b>(<i></i>)
@@ -797,7 +818,7 @@
         Public method to return the current coding.
 </p>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 codec name (string)
 </dd>
@@ -810,7 +831,7 @@
         Public method to return the main script we are currently running.
 </p>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 flag indicating a running debug session (boolean)
 </dd>
@@ -848,7 +869,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 the entered string
 </dd>
@@ -862,7 +883,7 @@
 </p>
 <a NAME="DebugClientBase.progTerminated" ID="DebugClientBase.progTerminated"></a>
 <h4>DebugClientBase.progTerminated</h4>
-<b>progTerminated</b>(<i>status, message=""</i>)
+<b>progTerminated</b>(<i>status, message="", closeSession=True</i>)
 
 <p>
         Public method to tell the debugger that the program has terminated.
@@ -877,6 +898,10 @@
 <dd>
 status message
 </dd>
+<dt><i>closeSession</i> (bool)</dt>
+<dd>
+flag indicating to close the debugger session
+</dd>
 </dl>
 <a NAME="DebugClientBase.readReady" ID="DebugClientBase.readReady"></a>
 <h4>DebugClientBase.readReady</h4>
@@ -889,11 +914,11 @@
 
 <dt><i>stream</i></dt>
 <dd>
-file like object that has data to be written
+file like object that has data to be read
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 flag indicating an error condition
 </dd>
@@ -927,7 +952,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 result of the function call
 </dd>
@@ -988,9 +1013,24 @@
 condition of the watch expression to be cleared
 </dd>
 </dl>
+<a NAME="DebugClientBase.sendDebuggerId" ID="DebugClientBase.sendDebuggerId"></a>
+<h4>DebugClientBase.sendDebuggerId</h4>
+<b>sendDebuggerId</b>(<i>debuggerId</i>)
+
+<p>
+        Public method to send the debug client id.
+</p>
+<dl>
+
+<dt><i>debuggerId</i> (str)</dt>
+<dd>
+id of this debug client instance (made up of
+            hostname and process ID)
+</dd>
+</dl>
 <a NAME="DebugClientBase.sendException" ID="DebugClientBase.sendException"></a>
 <h4>DebugClientBase.sendException</h4>
-<b>sendException</b>(<i>exceptionType, exceptionMessage, stack</i>)
+<b>sendException</b>(<i>exceptionType, exceptionMessage, stack, threadName</i>)
 
 <p>
         Public method to send information for an exception.
@@ -1009,6 +1049,10 @@
 <dd>
 stack trace information
 </dd>
+<dt><i>threadName</i> (str)</dt>
+<dd>
+name of the thread sending the event
+</dd>
 </dl>
 <a NAME="DebugClientBase.sendJsonCommand" ID="DebugClientBase.sendJsonCommand"></a>
 <h4>DebugClientBase.sendJsonCommand</h4>
@@ -1049,7 +1093,7 @@
 </dl>
 <a NAME="DebugClientBase.sendResponseLine" ID="DebugClientBase.sendResponseLine"></a>
 <h4>DebugClientBase.sendResponseLine</h4>
-<b>sendResponseLine</b>(<i>stack</i>)
+<b>sendResponseLine</b>(<i>stack, threadName</i>)
 
 <p>
         Public method to send the current call stack.
@@ -1060,10 +1104,14 @@
 <dd>
 call stack
 </dd>
+<dt><i>threadName</i> (str)</dt>
+<dd>
+name of the thread sending the event
+</dd>
 </dl>
 <a NAME="DebugClientBase.sendSyntaxError" ID="DebugClientBase.sendSyntaxError"></a>
 <h4>DebugClientBase.sendSyntaxError</h4>
-<b>sendSyntaxError</b>(<i>message, filename, lineno, charno</i>)
+<b>sendSyntaxError</b>(<i>message, filename, lineno, charno, threadName</i>)
 
 <p>
         Public method to send information for a syntax error.
@@ -1086,6 +1134,10 @@
 <dd>
 character number info
 </dd>
+<dt><i>threadName</i> (str)</dt>
+<dd>
+name of the thread sending the event
+</dd>
 </dl>
 <a NAME="DebugClientBase.sessionClose" ID="DebugClientBase.sessionClose"></a>
 <h4>DebugClientBase.sessionClose</h4>
@@ -1117,50 +1169,83 @@
 dictionary containing the disassembly information
 </dd>
 </dl>
+<a NAME="DebugClientBase.skipMultiProcessDebugging" ID="DebugClientBase.skipMultiProcessDebugging"></a>
+<h4>DebugClientBase.skipMultiProcessDebugging</h4>
+<b>skipMultiProcessDebugging</b>(<i>scriptName</i>)
+
+<p>
+        Public method to check, if the given script is eligible for debugging.
+</p>
+<dl>
+
+<dt><i>scriptName</i> (str)</dt>
+<dd>
+name of the script to check
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating eligibility
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
 <a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a>
 <h4>DebugClientBase.startDebugger</h4>
-<b>startDebugger</b>(<i>filename=None, host=None, port=None, enableTrace=True, exceptions=True, tracePython=False, redirect=True</i>)
+<b>startDebugger</b>(<i>filename=None, host=None, port=None, enableTrace=True, exceptions=True, tracePython=False, redirect=True, passive=True, multiprocessSupport=False</i>)
 
 <p>
         Public method used to start the remote debugger.
 </p>
 <dl>
 
-<dt><i>filename</i></dt>
+<dt><i>filename</i> (str)</dt>
 <dd>
-the program to be debugged (string)
+the program to be debugged
 </dd>
-<dt><i>host</i></dt>
+<dt><i>host</i> (str)</dt>
 <dd>
-hostname of the debug server (string)
+hostname of the debug server
 </dd>
-<dt><i>port</i></dt>
+<dt><i>port</i> (int)</dt>
 <dd>
-portnumber of the debug server (int)
+portnumber of the debug server
 </dd>
-<dt><i>enableTrace</i></dt>
+<dt><i>enableTrace</i> (bool)</dt>
 <dd>
-flag to enable the tracing function (boolean)
+flag to enable the tracing function
 </dd>
-<dt><i>exceptions</i></dt>
+<dt><i>exceptions</i> (bool)</dt>
 <dd>
 flag to enable exception reporting of the IDE
-            (boolean)
 </dd>
-<dt><i>tracePython</i></dt>
+<dt><i>tracePython</i> (bool)</dt>
 <dd>
 flag to enable tracing into the Python library
-            (boolean)
 </dd>
-<dt><i>redirect</i></dt>
+<dt><i>redirect</i> (bool)</dt>
 <dd>
 flag indicating redirection of stdin, stdout and
-            stderr (boolean)
+            stderr
+</dd>
+<dt><i>passive</i> (bool)</dt>
+<dd>
+flag indicating a passive debugging session
+</dd>
+<dt><i>multiprocessSupport</i> (bool)</dt>
+<dd>
+flag indicating to enable multiprocess
+            debugging support
 </dd>
 </dl>
 <a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a>
 <h4>DebugClientBase.startProgInDebugger</h4>
-<b>startProgInDebugger</b>(<i>progargs, wd='', host=None, port=None, exceptions=True, tracePython=False, redirect=True</i>)
+<b>startProgInDebugger</b>(<i>progargs, wd='', host=None, port=None, exceptions=True, tracePython=False, redirect=True, passive=True, multiprocessSupport=False, codeStr="", scriptModule=""</i>)
 
 <p>
         Public method used to start the remote debugger.
@@ -1199,6 +1284,35 @@
 flag indicating redirection of stdin, stdout and
             stderr (boolean)
 </dd>
+<dt><i>passive</i> (bool)</dt>
+<dd>
+flag indicating a passive debugging session
+</dd>
+<dt><i>multiprocessSupport</i> (bool)</dt>
+<dd>
+flag indicating to enable multiprocess
+            debugging support
+</dd>
+<dt><i>codeStr</i> (str)</dt>
+<dd>
+string containing Python code to execute
+</dd>
+<dt><i>scriptModule</i> (str)</dt>
+<dd>
+name of a module to be executed as a script
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+exit code of the debugged program
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+int
+</dd>
 </dl>
 <a NAME="DebugClientBase.writeReady" ID="DebugClientBase.writeReady"></a>
 <h4>DebugClientBase.writeReady</h4>
@@ -1234,22 +1348,6 @@
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />
-<a NAME="DebugClientFork" ID="DebugClientFork"></a>
-<h2>DebugClientFork</h2>
-<b>DebugClientFork</b>(<i></i>)
-
-<p>
-    Replacement for the standard os.fork().
-</p>
-<dl>
-<dt>Returns:</dt>
-<dd>
-result of the fork() call
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
 <a NAME="DebugClientInput" ID="DebugClientInput"></a>
 <h2>DebugClientInput</h2>
 <b>DebugClientInput</b>(<i>prompt=""</i>)
@@ -1268,7 +1366,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 result of the input() call
 </dd>

eric ide

mercurial