eric6/Debugger/DebuggerInterfaceNone.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7924
8a96736d465e
parent 7923
91e843545d9a
child 8273
698ae46f40a4
--- a/eric6/Debugger/DebuggerInterfaceNone.py	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Debugger/DebuggerInterfaceNone.py	Mon Feb 01 10:38:16 2021 +0100
@@ -23,8 +23,10 @@
         """
         Constructor
         
-        @param debugServer reference to the debug server (DebugServer)
-        @param passive flag indicating passive connection mode (boolean)
+        @param debugServer reference to the debug server
+        @type DebugServer
+        @param passive flag indicating passive connection mode
+        @type bool
         """
         super(DebuggerInterfaceNone, self).__init__()
         
@@ -84,7 +86,8 @@
         """
         Public method to retrieve the debug clients capabilities.
         
-        @return debug client capabilities (integer)
+        @return debug client capabilities
+        @rtype int
         """
         return self.clientCapabilities
         
@@ -92,23 +95,28 @@
         """
         Public slot to handle a new connection.
         
-        @param sock reference to the socket object (QTcpSocket)
-        @return flag indicating success (boolean)
+        @param sock reference to the socket object
+        @type QTcpSocket
+        @return flag indicating success
+        @rtype bool
         """
         return False
-        
-    def flush(self):
+    
+    def getDebuggerIds(self):
         """
-        Public slot to flush the queue.
+        Public method to return the IDs of the connected debugger backends.
+        
+        @return list of connected debugger backend IDs
+        @rtype list of str
         """
-        self.queue = []
+        return []
         
     def shutdown(self):
         """
         Public method to cleanly shut down.
         
-        It closes our socket and shuts down
-        the debug client. (Needed on Win OS)
+        It closes our socket and shuts down the debug client.
+        (Needed on Win OS)
         """
         self.qsock = None
         self.queue = []
@@ -117,7 +125,8 @@
         """
         Public method to test, if a debug client has connected.
         
-        @return flag indicating the connection status (boolean)
+        @return flag indicating the connection status
+        @rtype bool
         """
         return self.qsock is not None
         
@@ -125,38 +134,44 @@
         """
         Public method to set the environment for a program to debug, run, ...
         
-        @param env environment settings (dictionary)
+        @param env environment settings
+        @type dict
         """
         return
         
     def remoteLoad(self, fn, argv, wd, traceInterpreter=False,
-                   autoContinue=True, autoFork=False, forkChild=False):
+                   autoContinue=True, enableMultiprocess=False):
         """
         Public method to load a new program to debug.
         
-        @param fn the filename to debug (string)
-        @param argv the commandline arguments to pass to the program (string)
-        @param wd the working directory for the program (string)
-        @keyparam traceInterpreter flag indicating if the interpreter library
-            should be traced as well (boolean)
-        @keyparam autoContinue flag indicating, that the debugger should not
-            stop at the first executable line (boolean)
-        @keyparam autoFork flag indicating the automatic fork mode (boolean)
-        @keyparam forkChild flag indicating to debug the child after forking
-            (boolean)
+        @param fn the filename to debug
+        @type str
+        @param argv the commandline arguments to pass to the program
+        @type str
+        @param wd the working directory for the program
+        @type str
+        @param traceInterpreter flag indicating if the interpreter library
+            should be traced as well
+        @type bool
+        @param autoContinue flag indicating, that the debugger should not
+            stop at the first executable line
+        @type bool
+        @param enableMultiprocess flag indicating to perform multiprocess
+            debugging
+        @type bool
         """
         return
         
-    def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False):
+    def remoteRun(self, fn, argv, wd):
         """
         Public method to load a new program to run.
         
-        @param fn the filename to run (string)
-        @param argv the commandline arguments to pass to the program (string)
-        @param wd the working directory for the program (string)
-        @keyparam autoFork flag indicating the automatic fork mode (boolean)
-        @keyparam forkChild flag indicating to debug the child after forking
-            (boolean)
+        @param fn the filename to run
+        @type str
+        @param argv the commandline arguments to pass to the program
+        @type str
+        @param wd the working directory for the program
+        @type str
         """
         return
         
@@ -164,11 +179,15 @@
         """
         Public method to load a new program to collect coverage data.
         
-        @param fn the filename to run (string)
-        @param argv the commandline arguments to pass to the program (string)
-        @param wd the working directory for the program (string)
-        @keyparam erase flag indicating that coverage info should be
-            cleared first (boolean)
+        @param fn the filename to run
+        @type str
+        @param argv the commandline arguments to pass to the program
+        @type str
+        @param wd the working directory for the program
+        @type str
+        @param erase flag indicating that coverage info should be
+            cleared first
+        @type bool
         """
         return
 
@@ -176,159 +195,243 @@
         """
         Public method to load a new program to collect profiling data.
         
-        @param fn the filename to run (string)
-        @param argv the commandline arguments to pass to the program (string)
-        @param wd the working directory for the program (string)
-        @keyparam erase flag indicating that timing info should be cleared
-            first (boolean)
+        @param fn the filename to run
+        @type str
+        @param argv the commandline arguments to pass to the program
+        @type str
+        @param wd the working directory for the program
+        @type str
+        @param erase flag indicating that timing info should be cleared
+            first
+        @type bool
         """
         return
 
-    def remoteStatement(self, stmt):
+    def remoteStatement(self, debuggerId, stmt):
         """
         Public method to execute a Python statement.
         
-        @param stmt the Python statement to execute (string). It
-              should not have a trailing newline.
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param stmt the Python statement to execute.
+        @type str
         """
-        self.debugServer.signalClientStatement(False)
+        self.debugServer.signalClientStatement(False, "")
         return
 
-    def remoteStep(self):
+    def remoteStep(self, debuggerId):
         """
         Public method to single step the debugged program.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
+        """
+        return
+
+    def remoteStepOver(self, debuggerId):
+        """
+        Public method to step over the debugged program.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         return
 
-    def remoteStepOver(self):
+    def remoteStepOut(self, debuggerId):
         """
-        Public method to step over the debugged program.
+        Public method to step out the debugged program.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         return
 
-    def remoteStepOut(self):
+    def remoteStepQuit(self, debuggerId):
         """
-        Public method to step out the debugged program.
+        Public method to stop the debugged program.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         return
 
-    def remoteStepQuit(self):
+    def remoteContinue(self, debuggerId, special=False):
         """
-        Public method to stop the debugged program.
+        Public method to continue the debugged program.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param special flag indicating a special continue operation
+        @type bool
         """
         return
 
-    def remoteContinue(self, special=False):
+    def remoteContinueUntil(self, debuggerId, line):
         """
-        Public method to continue the debugged program.
+        Public method to continue the debugged program to the given line
+        or until returning from the current frame.
         
-        @param special flag indicating a special continue operation
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param line the new line, where execution should be continued to
+        @type int
         """
         return
 
-    def remoteMoveIP(self, line):
+    def remoteMoveIP(self, debuggerId, line):
         """
         Public method to move the instruction pointer to a different line.
         
+        @param debuggerId ID of the debugger backend
+        @type str
         @param line the new line, where execution should be continued
+        @type int
         """
         return
 
-    def remoteBreakpoint(self, fn, line, setBreakpoint, cond=None, temp=False):
+    def remoteBreakpoint(self, debuggerId, fn, line, setBreakpoint, cond=None,
+                         temp=False):
         """
         Public method to set or clear a breakpoint.
         
-        @param fn filename the breakpoint belongs to (string)
-        @param line linenumber of the breakpoint (int)
-        @param setBreakpoint flag indicating setting or resetting a
-            breakpoint (boolean)
-        @param cond condition of the breakpoint (string)
-        @param temp flag indicating a temporary breakpoint (boolean)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param fn filename the breakpoint belongs to
+        @type str
+        @param line linenumber of the breakpoint
+        @type int
+        @param setBreakpoint flag indicating setting or resetting a breakpoint
+        @type bool
+        @param cond condition of the breakpoint
+        @type str
+        @param temp flag indicating a temporary breakpoint
+        @type bool
         """
         return
         
-    def remoteBreakpointEnable(self, fn, line, enable):
+    def remoteBreakpointEnable(self, debuggerId, fn, line, enable):
         """
         Public method to enable or disable a breakpoint.
         
-        @param fn filename the breakpoint belongs to (string)
-        @param line linenumber of the breakpoint (int)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param fn filename the breakpoint belongs to
+        @type str
+        @param line linenumber of the breakpoint
+        @type int
         @param enable flag indicating enabling or disabling a breakpoint
-            (boolean)
+        @type bool
         """
         return
         
-    def remoteBreakpointIgnore(self, fn, line, count):
+    def remoteBreakpointIgnore(self, debuggerId, fn, line, count):
         """
         Public method to ignore a breakpoint the next couple of occurrences.
         
-        @param fn filename the breakpoint belongs to (string)
-        @param line linenumber of the breakpoint (int)
-        @param count number of occurrences to ignore (int)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param fn filename the breakpoint belongs to
+        @type str
+        @param line linenumber of the breakpoint
+        @type int
+        @param count number of occurrences to ignore
+        @type int
         """
         return
         
-    def remoteWatchpoint(self, cond, setWatch, temp=False):
+    def remoteWatchpoint(self, debuggerId, cond, setWatch, temp=False):
         """
         Public method to set or clear a watch expression.
         
-        @param cond expression of the watch expression (string)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param cond expression of the watch expression
+        @type str
         @param setWatch flag indicating setting or resetting a watch expression
-            (boolean)
-        @param temp flag indicating a temporary watch expression (boolean)
+        @type bool
+        @param temp flag indicating a temporary watch expression
+        @type bool
         """
         return
     
-    def remoteWatchpointEnable(self, cond, enable):
+    def remoteWatchpointEnable(self, debuggerId, cond, enable):
         """
         Public method to enable or disable a watch expression.
         
-        @param cond expression of the watch expression (string)
-        @param enable flag indicating enabling or disabling a watch
-            expression (boolean)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param cond expression of the watch expression
+        @type str
+        @param enable flag indicating enabling or disabling a watch expression
+        @type bool
         """
         return
     
-    def remoteWatchpointIgnore(self, cond, count):
+    def remoteWatchpointIgnore(self, debuggerId, cond, count):
         """
         Public method to ignore a watch expression the next couple of
         occurrences.
         
-        @param cond expression of the watch expression (string)
-        @param count number of occurrences to ignore (int)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param cond expression of the watch expression
+        @type str
+        @param count number of occurrences to ignore
+        @type int
         """
         return
     
-    def remoteRawInput(self, s):
+    def remoteRawInput(self, debuggerId, inputString):
         """
         Public method to send the raw input to the debugged program.
         
-        @param s the raw input (string)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param inputString the raw input
+        @type str
+        """
+        return
+        
+    def remoteThreadList(self, debuggerId):
+        """
+        Public method to request the list of threads from the client.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         return
         
-    def remoteThreadList(self):
-        """
-        Public method to request the list of threads from the client.
-        """
-        return
-        
-    def remoteSetThread(self, tid):
+    def remoteSetThread(self, debuggerId, tid):
         """
         Public method to request to set the given thread as current thread.
         
-        @param tid id of the thread (integer)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param tid id of the thread
+        @type int
         """
         return
+    
+    def remoteClientStack(self, debuggerId):
+        """
+        Public method to request the stack of the main thread.
         
-    def remoteClientVariables(self, scope, filterList, framenr=0, maxSize=0):
+        @param debuggerId ID of the debugger backend
+        @type str
+        """
+        return
+    
+    def remoteClientVariables(self, debuggerId, scope, filterList, framenr=0,
+                              maxSize=0):
         """
         Public method to request the variables of the debugged program.
         
+        @param debuggerId ID of the debugger backend
+        @type str
         @param scope the scope of the variables (0 = local, 1 = global)
         @type int
         @param filterList list of variable types to filter out
-        @type list of int
+        @type list of str
         @param framenr framenumber of the variables to retrieve
         @type int
         @param maxSize maximum size the formatted value of a variable will
@@ -338,18 +441,20 @@
         """
         return
         
-    def remoteClientVariable(self, scope, filterList, var, framenr=0,
-                             maxSize=0):
+    def remoteClientVariable(self, debuggerId, scope, filterList, var,
+                             framenr=0, maxSize=0):
         """
         Public method to request the variables of the debugged program.
         
+        @param debuggerId ID of the debugger backend
+        @type str
         @param scope the scope of the variables (0 = local, 1 = global)
         @type int
         @param filterList list of variable types to filter out
-        @type list of int
+        @type list of str
         @param var list encoded name of variable to retrieve
         @type list of str
-        @param framenr framenumber of the variables to retrieve (int)
+        @param framenr framenumber of the variables to retrieve
         @type int
         @param maxSize maximum size the formatted value of a variable will
             be shown. If it is bigger than that, a 'too big' indication will
@@ -357,31 +462,51 @@
         @type int
         """
         return
+    
+    def remoteClientDisassembly(self, debuggerId):
+        """
+        Public method to ask the client for the latest traceback disassembly.
         
-    def remoteClientSetFilter(self, scope, filterStr):
+        @param debuggerId ID of the debugger backend
+        @type str
+        """
+        return
+        
+    def remoteClientSetFilter(self, debuggerId, scope, filterStr):
         """
         Public method to set a variables filter list.
         
+        @param debuggerId ID of the debugger backend
+        @type str
         @param scope the scope of the variables (0 = local, 1 = global)
+        @type int
         @param filterStr regexp string for variable names to filter out
-            (string)
+        @type str
         """
         return
         
-    def setCallTraceEnabled(self, on):
+    def setCallTraceEnabled(self, debuggerId, on):
         """
         Public method to set the call trace state.
         
-        @param on flag indicating to enable the call trace function (boolean)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param on flag indicating to enable the call trace function
+        @type bool
         """
         return
     
-    def remoteEval(self, arg):
+    def remoteNoDebugList(self, debuggerId, noDebugList):
         """
-        Public method to evaluate arg in the current context of the debugged
-        program.
+        Public method to set a list of programs not to be debugged.
+        
+        The programs given in the list will not be run under the control
+        of the multi process debugger.
         
-        @param arg the arguments to evaluate (string)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param noDebugList list of Python programs not to be debugged
+        @type list of str
         """
         return
     
@@ -391,18 +516,24 @@
         """
         return
         
-    def remoteCapabilities(self):
+    def remoteCapabilities(self, debuggerId):
         """
         Public slot to get the debug clients capabilities.
+        
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         return
         
-    def remoteCompletion(self, text):
+    def remoteCompletion(self, debuggerId, text):
         """
         Public slot to get the a list of possible commandline completions
         from the remote client.
         
-        @param text the text to be completed (string)
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param text the text to be completed
+        @type str
         """
         return
         

eric ide

mercurial