eric6/Debugger/DebugUI.py

changeset 7932
c4c6b2784eec
parent 7928
a78ce4578fed
child 7933
ca1b44d522b9
equal deleted inserted replaced
7931:a761160bfde9 7932:c4c6b2784eec
126 self.__clientDebuggerIds = set() 126 self.__clientDebuggerIds = set()
127 127
128 # Connect the signals emitted by the debug-server 128 # Connect the signals emitted by the debug-server
129 debugServer.clientGone.connect(self.__clientGone) 129 debugServer.clientGone.connect(self.__clientGone)
130 debugServer.clientLine.connect(self.__clientLine) 130 debugServer.clientLine.connect(self.__clientLine)
131 debugServer.clientDisconnected.connect(self.__clientDisconnected)
131 debugServer.clientExit.connect(self.__clientExit) 132 debugServer.clientExit.connect(self.__clientExit)
132 debugServer.lastClientExited.connect(self.__lastClientExited) 133 debugServer.lastClientExited.connect(self.__lastClientExited)
133 debugServer.clientSyntaxError.connect(self.__clientSyntaxError) 134 debugServer.clientSyntaxError.connect(self.__clientSyntaxError)
134 debugServer.clientException.connect(self.__clientException) 135 debugServer.clientException.connect(self.__clientException)
135 debugServer.clientSignal.connect(self.__clientSignal) 136 debugServer.clientSignal.connect(self.__clientSignal)
1071 self.__getThreadList(debuggerId) 1072 self.__getThreadList(debuggerId)
1072 self.__getClientVariables(debuggerId) 1073 self.__getClientVariables(debuggerId)
1073 1074
1074 self.debugActGrp.setEnabled(True) 1075 self.debugActGrp.setEnabled(True)
1075 1076
1077 @pyqtSlot(str)
1078 def __clientDisconnected(self, debuggerId):
1079 """
1080 Private slot to handle a debug client disconnecting its control
1081 socket.
1082
1083 @param debuggerId ID of the debugger backend
1084 @type str
1085 """
1086 self.__clientDebuggerIds.discard(debuggerId)
1087
1088 if len(self.__clientDebuggerIds) == 0:
1089 self.viewmanager.exit()
1090 self.__resetUI(fullReset=False)
1091
1076 @pyqtSlot(str, int, str, bool, str) 1092 @pyqtSlot(str, int, str, bool, str)
1077 def __clientExit(self, program, status, message, quiet, debuggerId): 1093 def __clientExit(self, program, status, message, quiet, debuggerId):
1078 """ 1094 """
1079 Private method to handle the debugged program terminating. 1095 Private slot to handle the debugged program terminating.
1080 1096
1081 @param program name of the exited program 1097 @param program name of the exited program
1082 @type str 1098 @type str
1083 @param status exit code of the debugged program 1099 @param status exit code of the debugged program
1084 @type int 1100 @type int
1087 @param quiet flag indicating to suppress exit info display 1103 @param quiet flag indicating to suppress exit info display
1088 @type bool 1104 @type bool
1089 @param debuggerId ID of the debugger backend 1105 @param debuggerId ID of the debugger backend
1090 @type str 1106 @type str
1091 """ 1107 """
1092 self.__clientDebuggerIds.discard(debuggerId) 1108 self.__clientDisconnected(debuggerId)
1093
1094 if len(self.__clientDebuggerIds) == 0:
1095 self.viewmanager.exit()
1096 self.__resetUI(fullReset=False)
1097 1109
1098 if not quiet: 1110 if not quiet:
1099 if not program: 1111 if not program:
1100 program = self.ui.currentProg 1112 program = self.ui.currentProg
1101 if ( 1113 if (

eric ide

mercurial