File tree Expand file tree Collapse file tree
src/extension/debugger/inlineValue Expand file tree Collapse file tree Original file line number Diff line number Diff line change 131131 "description" : " %debugpy.debugJustMyCode%" ,
132132 "scope" : " resource" ,
133133 "type" : " boolean"
134+ },
135+ "debugpy.showPythonInlineValues" : {
136+ "default" : false ,
137+ "description" : " %debugpy.showPythonInlineValues%" ,
138+ "scope" : " resource" ,
139+ "type" : " boolean"
134140 }
141+
135142 },
136143 "title" : " Python Debugger" ,
137144 "type" : " object"
Original file line number Diff line number Diff line change 44 "debugpy.command.debugUsingLaunchConfig.title" : " Python Debugger: Debug using launch.json" ,
55 "debugpy.command.reportIssue.title" : " Report Issue..." ,
66 "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."
89}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010 InlineValueVariableLookup ,
1111 InlineValueEvaluatableExpression ,
1212} from 'vscode' ;
13- import { customRequest } from '../../common/vscodeapi' ;
13+ import { customRequest , getConfiguration } from '../../common/vscodeapi' ;
1414import { sendTelemetryEvent } from '../../telemetry' ;
1515import { EventName } from '../../telemetry/constants' ;
1616
@@ -20,6 +20,13 @@ export class PythonInlineValueProvider implements InlineValuesProvider {
2020 viewPort : Range ,
2121 context : InlineValueContext ,
2222 ) : Promise < InlineValue [ ] > {
23+ const showInlineValues = getConfiguration ( 'debugpy' ) . get < boolean > (
24+ 'showPythonInlineValues' ,
25+ false ,
26+ ) ;
27+ if ( ! showInlineValues ) {
28+ return [ ] ;
29+ }
2330 let scopesRequest = await customRequest ( 'scopes' , { frameId : context . frameId } ) ;
2431 let variablesRequest = await customRequest ( 'variables' , {
2532 variablesReference : scopesRequest . scopes [ 0 ] . variablesReference ,
You can’t perform that action at this time.
0 commit comments