src/eric7/Debugger/DebuggerInterfacePython.py

branch
eric7-maintenance
changeset 9549
67295777d9fe
parent 9449
c982bacca23f
parent 9482
a2bc06a54d9d
child 9654
7328efba128b
equal deleted inserted replaced
9451:24c847222774 9549:67295777d9fe
5 5
6 """ 6 """
7 Module implementing the Python3 debugger interface for the debug server. 7 Module implementing the Python3 debugger interface for the debug server.
8 """ 8 """
9 9
10 import contextlib
11 import json
12 import logging
10 import os 13 import os
11 import logging
12 import shlex 14 import shlex
13 import contextlib
14 15
15 from PyQt6.QtCore import QObject, QProcess, QProcessEnvironment, QTimer 16 from PyQt6.QtCore import QObject, QProcess, QProcessEnvironment, QTimer
16 17
18 from eric7 import Globals, Preferences, Utilities
19 from eric7.EricWidgets import EricMessageBox
17 from eric7.EricWidgets.EricApplication import ericApp 20 from eric7.EricWidgets.EricApplication import ericApp
18 from eric7.EricWidgets import EricMessageBox 21 from eric7.Globals import getConfig
19 22
20 from . import DebugClientCapabilities 23 from . import DebugClientCapabilities
21
22 from eric7 import Globals, Preferences, Utilities
23
24 from eric7.Globals import getConfig
25
26 24
27 ClientDefaultCapabilities = DebugClientCapabilities.HasAll 25 ClientDefaultCapabilities = DebugClientCapabilities.HasAll
28 26
29 27
30 class DebuggerInterfacePython(QObject): 28 class DebuggerInterfacePython(QObject):
1369 from the debug backend 1367 from the debug backend
1370 @type str 1368 @type str
1371 @param sock reference to the socket the data was received from 1369 @param sock reference to the socket the data was received from
1372 @type QTcpSocket 1370 @type QTcpSocket
1373 """ 1371 """
1374 import json
1375
1376 try: 1372 try:
1377 commandDict = json.loads(jsonStr.strip()) 1373 commandDict = json.loads(jsonStr.strip())
1378 except (TypeError, ValueError) as err: 1374 except (TypeError, ValueError) as err:
1379 EricMessageBox.critical( 1375 EricMessageBox.critical(
1380 None, 1376 None,
1591 @type str 1587 @type str
1592 @param sock reference to the socket object to be used (only used if 1588 @param sock reference to the socket object to be used (only used if
1593 debuggerId is not given) 1589 debuggerId is not given)
1594 @type QTcpSocket 1590 @type QTcpSocket
1595 """ 1591 """
1596 import json
1597
1598 commandDict = { 1592 commandDict = {
1599 "jsonrpc": "2.0", 1593 "jsonrpc": "2.0",
1600 "method": command, 1594 "method": command,
1601 "params": params, 1595 "params": params,
1602 } 1596 }

eric ide

mercurial