File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
src/extension/debugger/inlineValue Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 131
131
"description" : " %debugpy.debugJustMyCode%" ,
132
132
"scope" : " resource" ,
133
133
"type" : " boolean"
134
+ },
135
+ "debugpy.showPythonInlineValues" : {
136
+ "default" : false ,
137
+ "description" : " %debugpy.showPythonInlineValues%" ,
138
+ "scope" : " resource" ,
139
+ "type" : " boolean"
134
140
}
141
+
135
142
},
136
143
"title" : " Python Debugger" ,
137
144
"type" : " object"
Original file line number Diff line number Diff line change 4
4
"debugpy.command.debugUsingLaunchConfig.title" : " Python Debugger: Debug using launch.json" ,
5
5
"debugpy.command.reportIssue.title" : " Report Issue..." ,
6
6
"debugpy.command.viewOutput.title" : " Show Output" ,
7
- "debugpy.debugJustMyCode" : " When debugging only step through user-written code. Disable this to allow stepping into library code."
7
+ "debugpy.debugJustMyCode" : " When debugging only step through user-written code. Disable this to allow stepping into library code." ,
8
+ "debugpy.showPythonInlineValues" : " Enable this to see inline values in the editor while debugging."
8
9
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
10
10
InlineValueVariableLookup ,
11
11
InlineValueEvaluatableExpression ,
12
12
} from 'vscode' ;
13
- import { customRequest } from '../../common/vscodeapi' ;
13
+ import { customRequest , getConfiguration } from '../../common/vscodeapi' ;
14
14
import { sendTelemetryEvent } from '../../telemetry' ;
15
15
import { EventName } from '../../telemetry/constants' ;
16
16
@@ -20,6 +20,13 @@ export class PythonInlineValueProvider implements InlineValuesProvider {
20
20
viewPort : Range ,
21
21
context : InlineValueContext ,
22
22
) : Promise < InlineValue [ ] > {
23
+ const showInlineValues = getConfiguration ( 'debugpy' ) . get < boolean > (
24
+ 'showPythonInlineValues' ,
25
+ false ,
26
+ ) ;
27
+ if ( ! showInlineValues ) {
28
+ return [ ] ;
29
+ }
23
30
let scopesRequest = await customRequest ( 'scopes' , { frameId : context . frameId } ) ;
24
31
let variablesRequest = await customRequest ( 'variables' , {
25
32
variablesReference : scopesRequest . scopes [ 0 ] . variablesReference ,
You can’t perform that action at this time.
0 commit comments