@@ -1131,9 +1131,14 @@ Additions to the DAP
11311131
11321132The Jupyter debugger protocol makes several additions to the DAP:
11331133
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+ ########
11371142
11381143In order to support the debugging of notebook cells and of Jupyter consoles,
11391144which 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.
11591164 }
11601165 }
11611166
1167+ debugInfo
1168+ #########
1169+
11621170In order to support page reloading, or a client connecting at a later stage,
11631171Jupyter kernels must store the state of the debugger (such as breakpoints,
11641172whether 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
11961204
11971205 The `source_breakpoint ` schema is specified by the Debug Adapter Protocol.
11981206
1207+ inspectVariables
1208+ ################
1209+
11991210The `inspectVariables ` is meant to retrieve the values of all the variables
12001211that have been defined in the kernel. It is a DAP `Request ` with no extra
12011212argument.
@@ -1224,10 +1235,13 @@ argument.
12241235 }
12251236 }
12261237
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
12281242variable that has been defined in the kernel.
12291243
1230- Content of the `` richInspectVariables ` ` request::
1244+ Content of the `richInspectVariables ` request::
12311245
12321246 {
12331247 'type' : 'request',
@@ -1239,7 +1253,7 @@ variable that has been defined in the kernel.
12391253 }
12401254 }
12411255
1242- Content of the `` richInspectVariables ` ` response::
1256+ Content of the `richInspectVariables ` response::
12431257
12441258 {
12451259 'type' : 'response',
@@ -1251,6 +1265,41 @@ variable that has been defined in the kernel.
12511265 }
12521266 }
12531267
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+
12541303.. versionadded :: 5.5
12551304
12561305Messages on the IOPub (PUB/SUB) channel
0 commit comments