From 24c9ebabefafd6ad518b7307c06d25b197fce25a Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 13 Jan 2017 17:15:56 +0100 Subject: [PATCH] debug: put inline values behid a flag --- src/vs/workbench/parts/debug/common/debug.ts | 1 + .../parts/debug/electron-browser/debug.contribution.ts | 5 +++++ .../debug/electron-browser/debugEditorContribution.ts | 10 +++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index ea687355b4071..ab71366d4b72b 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -276,6 +276,7 @@ export enum State { export interface IDebugConfiguration { allowBreakpointsEverywhere: boolean; openExplorerOnEnd: boolean; + inlineValues: boolean; } export interface IGlobalConfig { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 055036a7108c8..70ae4cd04b9b1 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -176,6 +176,11 @@ configurationRegistry.registerConfiguration({ type: 'boolean', description: nls.localize({ comment: ['This is the description for a setting'], key: 'openExplorerOnEnd' }, "Automatically open explorer view on the end of a debug session"), default: false + }, + 'debug.inlineValues': { + type: 'boolean', + description: nls.localize({ comment: ['This is the description for a setting'], key: 'inlineValues' }, "Show variable values inline in editor while debugging"), + default: false } } }); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 4e8fc51a023f6..1fa41b06b92ee 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -23,12 +23,13 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { DebugHoverWidget } from 'vs/workbench/parts/debug/electron-browser/debugHover'; import { RemoveBreakpointAction, EditConditionalBreakpointAction, EnableBreakpointAction, DisableBreakpointAction, AddConditionalBreakpointAction } from 'vs/workbench/parts/debug/browser/debugActions'; -import { IDebugEditorContribution, IDebugService, State, IBreakpoint, EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_WIDGET_VISIBLE, IStackFrame } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugEditorContribution, IDebugService, State, IBreakpoint, EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_WIDGET_VISIBLE, IStackFrame, IDebugConfiguration } from 'vs/workbench/parts/debug/common/debug'; import { BreakpointWidget } from 'vs/workbench/parts/debug/browser/breakpointWidget'; import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; import { getNameValueMapFromScopeChildren, getDecorators, getEditorWordRangeMap } from 'vs/workbench/parts/debug/electron-browser/debugInlineDecorators'; @@ -63,7 +64,8 @@ export class DebugEditorContribution implements IDebugEditorContribution { @IContextKeyService contextKeyService: IContextKeyService, @ICommandService private commandService: ICommandService, @ICodeEditorService private codeEditorService: ICodeEditorService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IConfigurationService private configurationService: IConfigurationService ) { this.breakpointHintDecoration = []; this.hoverWidget = new DebugHoverWidget(this.editor, this.debugService, this.instantiationService); @@ -210,7 +212,9 @@ export class DebugEditorContribution implements IDebugEditorContribution { this.hideHoverWidget(); } - this.updateInlineDecorators(sf); + if (this.configurationService.getConfiguration('debug').inlineValues) { + this.updateInlineDecorators(sf); + } } private updateInlineDecorators(stackFrame: IStackFrame): void {