@@ -1131,9 +1131,14 @@ Additions to the DAP
1131
1131
1132
1132
The Jupyter debugger protocol makes several additions to the DAP:
1133
1133
1134
- - the `dumpCell ` request and response messages
1135
- - the `debugInfo ` request and response messages
1136
- - the `inspectVariables ` request and response messages
1134
+ - the `dumpCell `_ request and response messages
1135
+ - the `debugInfo `_ request and response messages
1136
+ - the `inspectVariables `_ request and response messages
1137
+ - the `richInspectVariables `_ request and response messages
1138
+ - the `copyToGlobals `_ request and response messages
1139
+
1140
+ dumpCell
1141
+ ########
1137
1142
1138
1143
In order to support the debugging of notebook cells and of Jupyter consoles,
1139
1144
which are not based on source files, we need a message to submit code to the
@@ -1159,6 +1164,9 @@ debugger to which breakpoints can be added.
1159
1164
}
1160
1165
}
1161
1166
1167
+ debugInfo
1168
+ #########
1169
+
1162
1170
In order to support page reloading, or a client connecting at a later stage,
1163
1171
Jupyter kernels must store the state of the debugger (such as breakpoints,
1164
1172
whether the debugger is currently stopped). The `debugInfo ` request is a DAP
@@ -1196,6 +1204,9 @@ whether the debugger is currently stopped). The `debugInfo` request is a DAP
1196
1204
1197
1205
The `source_breakpoint ` schema is specified by the Debug Adapter Protocol.
1198
1206
1207
+ inspectVariables
1208
+ ################
1209
+
1199
1210
The `inspectVariables ` is meant to retrieve the values of all the variables
1200
1211
that have been defined in the kernel. It is a DAP `Request ` with no extra
1201
1212
argument.
@@ -1224,10 +1235,13 @@ argument.
1224
1235
}
1225
1236
}
1226
1237
1227
- The ``richInspectVariables `` request allows to get the rich representation of a
1238
+ richInspectVariables
1239
+ ####################
1240
+
1241
+ The `richInspectVariables ` request allows to get the rich representation of a
1228
1242
variable that has been defined in the kernel.
1229
1243
1230
- Content of the `` richInspectVariables ` ` request::
1244
+ Content of the `richInspectVariables ` request::
1231
1245
1232
1246
{
1233
1247
'type' : 'request',
@@ -1239,7 +1253,7 @@ variable that has been defined in the kernel.
1239
1253
}
1240
1254
}
1241
1255
1242
- Content of the `` richInspectVariables ` ` response::
1256
+ Content of the `richInspectVariables ` response::
1243
1257
1244
1258
{
1245
1259
'type' : 'response',
@@ -1251,6 +1265,41 @@ variable that has been defined in the kernel.
1251
1265
}
1252
1266
}
1253
1267
1268
+ copyToGlobals
1269
+ #############
1270
+
1271
+ The `copyToGlobals ` request allows to copy a variable from the local variable panel
1272
+ of the debugger to the `global`` scope to inspect it after debug session.
1273
+
1274
+ Content of the `copyToGlobals ` request::
1275
+
1276
+ {
1277
+ 'type': 'request',
1278
+ 'command': 'copyToGlobals',
1279
+ 'arguments': {
1280
+ # the variable to copy from the frame corresponding to `srcFrameId`
1281
+ 'srcVariableName': str,
1282
+ 'srcFrameId': int,
1283
+ # the copied variable name in the global scope
1284
+ 'dstVariableName': str
1285
+ }
1286
+ }
1287
+
1288
+ Content of the `copyToGlobals ` response::
1289
+
1290
+ {
1291
+ 'type': 'response',
1292
+ 'success': bool,
1293
+ 'command': 'setExpression',
1294
+ 'body': {
1295
+ # string representation of the copied variable
1296
+ 'value': str,
1297
+ # type of the copied variable
1298
+ 'type': str,
1299
+ 'variablesReference': int
1300
+ }
1301
+ }
1302
+
1254
1303
.. versionadded :: 5.5
1255
1304
1256
1305
Messages on the IOPub (PUB/SUB) channel
0 commit comments