src/eric7/Debugger/DebugServer.py

branch
server
changeset 10555
08e853c0c77b
parent 10439
21c28b0f9e41
child 10561
be23a662d709
diff -r d80184d38152 -r 08e853c0c77b src/eric7/Debugger/DebugServer.py
--- a/src/eric7/Debugger/DebugServer.py	Wed Feb 07 15:28:08 2024 +0100
+++ b/src/eric7/Debugger/DebugServer.py	Fri Feb 09 19:54:15 2024 +0100
@@ -492,28 +492,32 @@
         forProject=False,
         runInConsole=False,
         venvName="",
-        workingDir=None,
+        workingDir="",
         configOverride=None,
+        startRemote=False
     ):
         """
         Public method to start a debug client.
 
-        @param unplanned flag indicating that the client has died
-        @type bool
-        @param clType type of client to be started
-        @type str
-        @param forProject flag indicating a project related action
-        @type bool
+        @param unplanned flag indicating that the client has died (defaults to True)
+        @type bool (optional)
+        @param clType type of client to be started (defaults to None)
+        @type str (optional)
+        @param forProject flag indicating a project related action (defaults to False)
+        @type bool (optional)
         @param runInConsole flag indicating to start the debugger in a
-            console window
-        @type bool
-        @param venvName name of the virtual environment to be used
-        @type str
-        @param workingDir directory to start the debugger client in
-        @type str
-        @param configOverride dictionary containing the global config override
-            data
-        @type dict
+            console window (defaults to False)
+        @type bool (optional)
+        @param venvName name of the virtual environment to be used (defaults to "")
+        @type str (optional)
+        @param workingDir directory to start the debugger client in (defaults to "")
+        @type str (optional)
+        @param configOverride dictionary containing the global config override data
+            (defaults to None)
+        @type dict (optional)
+        @param startRemote flag indicating to start the client via an eric-ide server
+            (defaults to False)
+        @type bool (optional)
         """
         self.running = False
 
@@ -560,6 +564,7 @@
                         self.__originalPathString,
                         workingDir=workingDir,
                         configOverride=configOverride,
+                        startRemote=startRemote,
                     )
                 else:
                     (
@@ -573,6 +578,7 @@
                         self.__originalPathString,
                         workingDir=workingDir,
                         configOverride=configOverride,
+                        # TODO: add 'startRemote' parameter
                     )
             else:
                 (
@@ -586,6 +592,7 @@
                     self.__originalPathString,
                     workingDir=workingDir,
                     configOverride=configOverride,
+                    startRemote=startRemote,
                 )
 
             if self.clientProcess:
@@ -603,6 +610,8 @@
                 elif self.__autoClearShell:
                     self.__autoClearShell = False
                     self.remoteBanner()
+            elif startRemote:
+                self.remoteBanner()
             else:
                 if clType and self.lastClientType:
                     self.__setClientType(self.lastClientType)
@@ -2223,3 +2232,11 @@
         except KeyError:
             # The project object is not present
             return ""
+
+    def getEricServerEnvironmentString(self):
+        """
+        Public method to get the string for an eric-ide server environment.
+        """
+        # TODO: make this more elaborate once server environments definitions
+        #       are supported
+        return "eric-ide Server"

eric ide

mercurial