@@ -1018,13 +1018,39 @@ This message type is used with debugging kernels to request specific actions
1018
1018
to be performed by the debugger such as adding a breakpoint or stepping into
1019
1019
a code.
1020
1020
1021
+ The contents of debug requests and replies respectively follow the schemas of the
1022
+ ``Request `` and ``Response `` messages of the *Debug Adapter Protocol * (DAP _).
1023
+
1021
1024
Message type: ``debug_request ``::
1022
1025
1023
- content = {}
1026
+ content = {
1027
+ # The type of debug message
1028
+ 'type': 'request',
1029
+ # A unique sequence number
1030
+ 'seq': int,
1031
+ # The command to execute
1032
+ 'command': str
1033
+ # Optional: arguments for the command
1034
+ 'arguments': {}
1035
+ }
1024
1036
1025
1037
Message type: ``debug_reply ``::
1026
1038
1027
- content = {}
1039
+ content = {
1040
+ # The type of debug message
1041
+ 'type': 'response',
1042
+ # Sequence number of the corresponding request
1043
+ 'request_seq': int
1044
+ # Outcome of the request.
1045
+ # - True if the request was successful. Then the 'body' attribute may contain the result of the request.
1046
+ # - False if the request failed. Then the 'message' attributes contains the short-form error,
1047
+ # and 'body' may contain additional information.
1048
+ 'success': bool,
1049
+ # Optional: short-form error in case of failure
1050
+ 'message': str,
1051
+ # Optional: request result in case of success, and further failure information otherwise.
1052
+ 'body': any
1053
+ }
1028
1054
1029
1055
The ``content `` dict can be any JSON information used by debugging frontends
1030
1056
and kernels.
@@ -1312,9 +1338,21 @@ Debug event
1312
1338
This message type is used by debugging kernels to send debugging events to the
1313
1339
frontend.
1314
1340
1341
+ The content of the debug events follows the schema of the ``Event `` message of
1342
+ the *Debug Adapter Protocol * (DAP _).
1343
+
1315
1344
Message type: ``debug_event ``::
1316
1345
1317
- content = {}
1346
+ content = {
1347
+ # The type of debug message
1348
+ 'type': 'event',
1349
+ # A unique sequence number
1350
+ 'seq': int,
1351
+ # Type of event
1352
+ 'event': str
1353
+ # Optional: event-specific information
1354
+ 'body': {}
1355
+ }
1318
1356
1319
1357
The ``content `` dict can be any JSON information used by debugging frontends.
1320
1358
@@ -1511,3 +1549,4 @@ Known *not* affected frontends:
1511
1549
1512
1550
.. _ZeroMQ : http://zeromq.org
1513
1551
.. _nteract : https://nteract.io
1552
+ .. _DAP : https://microsoft.github.io/debug-adapter-protocol/specification
0 commit comments