File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
debugger-info-copy-to-globals Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,47 @@ UI if this is supported by the kernel before displaying the corresponding menu e
23
23
24
24
We propose to add a new ` copyToGlobals ` boolean field to the ` debugger_info `
25
25
response which will inform the UI that this request is supported.
26
+
27
+ ## Reference-level explanation
28
+
29
+ This boolean flag should be included in the ` debugger_info ` response from the kernel
30
+ which supports the feature. It is optional, assuming that its absence is understood
31
+ as ` false ` from the client perspective.
32
+
33
+ If the feature is supported, the kernel must provide a function for copying a variable
34
+ from a local scope to the global scope.
35
+ The communication between the UI and the kernel (request - response) will have the
36
+ structures described at
37
+ https://jupyter-client.readthedocs.io/en/latest/messaging.html#copytoglobals .
38
+
39
+ - Request (from UI to kernel)
40
+
41
+ ``` json
42
+ {
43
+ 'type': 'request',
44
+ 'command': 'copyToGlobals',
45
+ 'arguments': {
46
+ # the variable to copy from the frame corresponding to `srcFrameId`
47
+ 'srcVariableName': str,
48
+ 'srcFrameId': int,
49
+ # the copied variable name in the global scope
50
+ 'dstVariableName': str
51
+ }
52
+ }
53
+ ```
54
+
55
+ - Response (from kernel to UI)
56
+
57
+ ``` json
58
+ {
59
+ 'type': 'response',
60
+ 'success': bool,
61
+ 'command': 'setExpression',
62
+ 'body': {
63
+ # string representation of the copied variable
64
+ 'value': str,
65
+ # type of the copied variable
66
+ 'type': str,
67
+ 'variablesReference': int
68
+ }
69
+ }
You can’t perform that action at this time.
0 commit comments