Skip to content

Commit 24c9eba

Browse files
committed
debug: put inline values behid a flag
1 parent 6091d5d commit 24c9eba

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/vs/workbench/parts/debug/common/debug.ts

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ export enum State {
276276
export interface IDebugConfiguration {
277277
allowBreakpointsEverywhere: boolean;
278278
openExplorerOnEnd: boolean;
279+
inlineValues: boolean;
279280
}
280281

281282
export interface IGlobalConfig {

src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts

+5
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ configurationRegistry.registerConfiguration({
176176
type: 'boolean',
177177
description: nls.localize({ comment: ['This is the description for a setting'], key: 'openExplorerOnEnd' }, "Automatically open explorer view on the end of a debug session"),
178178
default: false
179+
},
180+
'debug.inlineValues': {
181+
type: 'boolean',
182+
description: nls.localize({ comment: ['This is the description for a setting'], key: 'inlineValues' }, "Show variable values inline in editor while debugging"),
183+
default: false
179184
}
180185
}
181186
});

src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ import { Range } from 'vs/editor/common/core/range';
2323
import { Selection } from 'vs/editor/common/core/selection';
2424
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
2525
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
26+
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
2627
import { ICommandService } from 'vs/platform/commands/common/commands';
2728
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
2829
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
2930
import { DebugHoverWidget } from 'vs/workbench/parts/debug/electron-browser/debugHover';
3031
import { RemoveBreakpointAction, EditConditionalBreakpointAction, EnableBreakpointAction, DisableBreakpointAction, AddConditionalBreakpointAction } from 'vs/workbench/parts/debug/browser/debugActions';
31-
import { IDebugEditorContribution, IDebugService, State, IBreakpoint, EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_WIDGET_VISIBLE, IStackFrame } from 'vs/workbench/parts/debug/common/debug';
32+
import { IDebugEditorContribution, IDebugService, State, IBreakpoint, EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_WIDGET_VISIBLE, IStackFrame, IDebugConfiguration } from 'vs/workbench/parts/debug/common/debug';
3233
import { BreakpointWidget } from 'vs/workbench/parts/debug/browser/breakpointWidget';
3334
import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets';
3435
import { getNameValueMapFromScopeChildren, getDecorators, getEditorWordRangeMap } from 'vs/workbench/parts/debug/electron-browser/debugInlineDecorators';
@@ -63,7 +64,8 @@ export class DebugEditorContribution implements IDebugEditorContribution {
6364
@IContextKeyService contextKeyService: IContextKeyService,
6465
@ICommandService private commandService: ICommandService,
6566
@ICodeEditorService private codeEditorService: ICodeEditorService,
66-
@ITelemetryService private telemetryService: ITelemetryService
67+
@ITelemetryService private telemetryService: ITelemetryService,
68+
@IConfigurationService private configurationService: IConfigurationService
6769
) {
6870
this.breakpointHintDecoration = [];
6971
this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, this.instantiationService);
@@ -210,7 +212,9 @@ export class DebugEditorContribution implements IDebugEditorContribution {
210212
this.hideHoverWidget();
211213
}
212214

213-
this.updateInlineDecorators(sf);
215+
if (this.configurationService.getConfiguration<IDebugConfiguration>('debug').inlineValues) {
216+
this.updateInlineDecorators(sf);
217+
}
214218
}
215219

216220
private updateInlineDecorators(stackFrame: IStackFrame): void {

0 commit comments

Comments
 (0)