Skip to content

Commit 9666e7a

Browse files
Add variable presentation setting
1 parent 38a166b commit 9666e7a

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

package.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,64 @@
140140
"tags": [
141141
"experimental"
142142
]
143+
},
144+
"debugpy.variablePresentation": {
145+
"default": {},
146+
"description": "Allow the user to specify the preferred presentation of variables.",
147+
"scope": "resource",
148+
"type": "object",
149+
"properties": {
150+
"all":{
151+
"type": "string",
152+
"default": "group",
153+
"description" : "Set preferred presentation of variables for all instances.",
154+
"enum": [
155+
"inline",
156+
"group",
157+
"hide"
158+
]
159+
},
160+
"class":{
161+
"type": "string",
162+
"default": "group",
163+
"description" : "Set Class presentation of variables.",
164+
"enum": [
165+
"inline",
166+
"group",
167+
"hide"
168+
]
169+
},
170+
"function":{
171+
"type": "string",
172+
"default": "group",
173+
"description" : "Set Function preferred presentation of variables.",
174+
"enum": [
175+
"inline",
176+
"group",
177+
"hide"
178+
]
179+
},
180+
"protected":{
181+
"type": "string",
182+
"default": "group",
183+
"description" : "Set Protected preferred presentation of variables.",
184+
"enum": [
185+
"inline",
186+
"group",
187+
"hide"
188+
]
189+
},
190+
"special":{
191+
"type": "string",
192+
"default": "group",
193+
"description" : "Set Special preferred presentation of variables.",
194+
"enum": [
195+
"inline",
196+
"group",
197+
"hide"
198+
]
199+
}
200+
}
143201
}
144202
},
145203
"title": "Python Debugger",

src/extension/debugger/configuration/resolvers/attach.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ export class AttachConfigurationResolver extends BaseConfigurationResolver<Attac
5050
true,
5151
);
5252
}
53+
if (debugConfiguration.variablePresentation == undefined) {
54+
debugConfiguration.variablePresentation = getConfiguration('debugpy', workspaceFolder).get<object>(
55+
'variablePresentation',
56+
{},
57+
);
58+
}
5359
debugConfiguration.showReturnValue = debugConfiguration.showReturnValue !== false;
5460
// Pass workspace folder so we can get this when we get debug events firing.
5561
debugConfiguration.workspaceFolder = workspaceFolder ? workspaceFolder.fsPath : undefined;

src/extension/debugger/configuration/resolvers/launch.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc
114114
true,
115115
);
116116
}
117+
if (debugConfiguration.variablePresentation == undefined) {
118+
debugConfiguration.variablePresentation = getConfiguration('debugpy', workspaceFolder).get<object>(
119+
'variablePresentation',
120+
{},
121+
);
122+
}
117123
// Pass workspace folder so we can get this when we get debug events firing.
118124
debugConfiguration.workspaceFolder = workspaceFolder ? workspaceFolder.fsPath : undefined;
119125
const debugOptions = debugConfiguration.debugOptions!;

0 commit comments

Comments
 (0)