--- a/eric6/Debugger/DebugUI.py Thu Dec 31 17:42:50 2020 +0100 +++ b/eric6/Debugger/DebugUI.py Fri Jan 01 16:25:30 2021 +0100 @@ -128,6 +128,7 @@ # Connect the signals emitted by the debug-server debugServer.clientGone.connect(self.__clientGone) debugServer.clientLine.connect(self.__clientLine) + debugServer.clientDisconnected.connect(self.__clientDisconnected) debugServer.clientExit.connect(self.__clientExit) debugServer.lastClientExited.connect(self.__lastClientExited) debugServer.clientSyntaxError.connect(self.__clientSyntaxError) @@ -1073,10 +1074,25 @@ self.debugActGrp.setEnabled(True) + @pyqtSlot(str) + def __clientDisconnected(self, debuggerId): + """ + Private slot to handle a debug client disconnecting its control + socket. + + @param debuggerId ID of the debugger backend + @type str + """ + self.__clientDebuggerIds.discard(debuggerId) + + if len(self.__clientDebuggerIds) == 0: + self.viewmanager.exit() + self.__resetUI(fullReset=False) + @pyqtSlot(str, int, str, bool, str) def __clientExit(self, program, status, message, quiet, debuggerId): """ - Private method to handle the debugged program terminating. + Private slot to handle the debugged program terminating. @param program name of the exited program @type str @@ -1089,11 +1105,7 @@ @param debuggerId ID of the debugger backend @type str """ - self.__clientDebuggerIds.discard(debuggerId) - - if len(self.__clientDebuggerIds) == 0: - self.viewmanager.exit() - self.__resetUI(fullReset=False) + self.__clientDisconnected(debuggerId) if not quiet: if not program: