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, |