src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py

branch
server
changeset 10563
b4b47c1a02ba
parent 10561
be23a662d709
child 10567
b098e0d028cc
diff -r be23a662d709 -r b4b47c1a02ba src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py
--- a/src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py	Sun Feb 11 18:35:44 2024 +0100
+++ b/src/eric7/RemoteServer/EricServerDebuggerRequestHandler.py	Mon Feb 12 18:09:53 2024 +0100
@@ -40,6 +40,7 @@
 
         self.__mainClientId = None
         self.__client = None
+        self.__inStartClient = False
         self.__pendingConnections = []
         self.__connections = {}
 
@@ -189,14 +190,6 @@
 
         sock.close()
 
-        if not self.__connections:
-            # no active connections anymore
-            self.__server.sendJson(
-                category=EricRequestCategory.Debugger,
-                reply="LastDebugClientExited",
-                params={},
-            )
-
     def __mainClientExited(self):
         """
         Private method to handle exiting of the main debug client.
@@ -247,13 +240,6 @@
         self.__mainClientId = None
         self.__client = None
 
-        # no active connections anymore
-        self.__server.sendJson(
-            category=EricRequestCategory.Debugger,
-            reply="LastDebugClientExited",
-            params={},
-        )
-
     def __shutdownSocket(self, debuggerId, sock):
         """
         Private method to shut down a socket.
@@ -302,10 +288,12 @@
         @param params dictionary containing the request data
         @type dict
         """
+        self.__inStartClient = True
+
         # 1. stop an already started debug client
         if self.__client is not None:
-            self.__client.terminate()
-            self.__client = None
+            # TODO: unregister stdin & stderr
+            pass
 
         # 2. start a debug client
         debugClient = os.path.abspath(
@@ -327,6 +315,8 @@
         )
         # TODO: register stdin & stderr with selector
 
+        self.__inStartClient = False
+
     def __stopClient(self, params):  # noqa: U100
         """
         Private method to stop the current debug client process.

eric ide

mercurial