Skip to content

Commit

Permalink
debug: put inline values behid a flag
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Jan 13, 2017
1 parent 6091d5d commit 24c9eba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/vs/workbench/parts/debug/common/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export enum State {
export interface IDebugConfiguration {
allowBreakpointsEverywhere: boolean;
openExplorerOnEnd: boolean;
inlineValues: boolean;
}

export interface IGlobalConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -210,7 +212,9 @@ export class DebugEditorContribution implements IDebugEditorContribution {
this.hideHoverWidget();
}

this.updateInlineDecorators(sf);
if (this.configurationService.getConfiguration<IDebugConfiguration>('debug').inlineValues) {
this.updateInlineDecorators(sf);
}
}

private updateInlineDecorators(stackFrame: IStackFrame): void {
Expand Down

0 comments on commit 24c9eba

Please sign in to comment.