src/eric7/Debugger/DebuggerInterfacePython.py

branch
eric7-maintenance
changeset 10941
07cad049002c
parent 10814
ba20efe10336
parent 10930
5a883e68aa35
child 11019
27cd57e98461
equal deleted inserted replaced
10893:ea32acb9764c 10941:07cad049002c
16 import time 16 import time
17 import zlib 17 import zlib
18 18
19 from PyQt6.QtCore import QObject, QProcess, QProcessEnvironment, QTimer, pyqtSlot 19 from PyQt6.QtCore import QObject, QProcess, QProcessEnvironment, QTimer, pyqtSlot
20 20
21 from eric7 import Preferences, Utilities 21 from eric7 import EricUtilities, Preferences, Utilities
22 from eric7.EricWidgets import EricMessageBox 22 from eric7.EricWidgets import EricMessageBox
23 from eric7.EricWidgets.EricApplication import ericApp 23 from eric7.EricWidgets.EricApplication import ericApp
24 from eric7.Globals import getConfig 24 from eric7.Globals import getConfig
25 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities, PythonUtilities 25 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities, PythonUtilities
26 26
1634 jsonStr = data.decode("utf-8", "backslashreplace") 1634 jsonStr = data.decode("utf-8", "backslashreplace")
1635 1635
1636 logging.getLogger(__name__).debug("<Debug-Server> %s", jsonStr) 1636 logging.getLogger(__name__).debug("<Debug-Server> %s", jsonStr)
1637 ##print("Server: ", jsonStr) ## debug # __IGNORE_WARNING_M891__ 1637 ##print("Server: ", jsonStr) ## debug # __IGNORE_WARNING_M891__
1638 1638
1639 self.handleJsonCommand(jsonStr, sock) 1639 if jsonStr:
1640 self.handleJsonCommand(jsonStr, sock)
1640 1641
1641 def handleJsonCommand(self, jsonStr, sock): 1642 def handleJsonCommand(self, jsonStr, sock):
1642 """ 1643 """
1643 Public method to handle a command or response serialized as a 1644 Public method to handle a command or response serialized as a
1644 JSON string. 1645 JSON string.
1660 """ backend could not be decoded. Please report""" 1661 """ backend could not be decoded. Please report"""
1661 """ this issue with the received data to the""" 1662 """ this issue with the received data to the"""
1662 """ eric bugs email address.</p>""" 1663 """ eric bugs email address.</p>"""
1663 """<p>Error: {0}</p>""" 1664 """<p>Error: {0}</p>"""
1664 """<p>Data:<br/>{1}</p>""" 1665 """<p>Data:<br/>{1}</p>"""
1665 ).format(str(err), Utilities.html_encode(jsonStr.strip())), 1666 ).format(str(err), EricUtilities.html_encode(jsonStr.strip())),
1666 EricMessageBox.Ok, 1667 EricMessageBox.Ok,
1667 ) 1668 )
1668 return 1669 return
1669 1670
1670 method = commandDict["method"] 1671 method = commandDict["method"]

eric ide

mercurial