--- a/src/eric7/RemoteServerInterface/EricServerDebuggerInterface.py Sun Feb 11 18:35:44 2024 +0100 +++ b/src/eric7/RemoteServerInterface/EricServerDebuggerInterface.py Mon Feb 12 18:09:53 2024 +0100 @@ -57,11 +57,12 @@ @param jsonCommand JSON encoded command dictionary to be relayed @type str """ - self.__serverInterface.sendJson( - category=EricRequestCategory.Debugger, - request="DebugClientCommand", - params={"debugger_id": debuggerId, "command": jsonCommand}, - ) + if self.__serverInterface.isServerConnected(): + self.__serverInterface.sendJson( + category=EricRequestCategory.Debugger, + request="DebugClientCommand", + params={"debugger_id": debuggerId, "command": jsonCommand}, + ) @pyqtSlot(str, dict) def __handleDebuggerReply(self, reply, params): @@ -73,17 +74,18 @@ @param params dictionary containing the reply data @type dict """ - try: - self.__replyMethodMapping[reply](params) - except KeyError: - EricMessageBox.critical( - None, - self.tr("Unknown Server Reply"), - self.tr( - "<p>The eric-ide server debugger interface sent the unknown reply" - " <b>{0}</b>.</p>" - ).format(reply), - ) + if self.__serverInterface.isServerConnected(): + try: + self.__replyMethodMapping[reply](params) + except KeyError: + EricMessageBox.critical( + None, + self.tr("Unknown Server Reply"), + self.tr( + "<p>The eric-ide server debugger interface sent the unknown" + " reply <b>{0}</b>.</p>" + ).format(reply), + ) ####################################################################### ## Methods for handling of debug client replies.