Automatically show inline values if an inline values provider is registered
fixes #119560
This commit is contained in:
parent
3a2a24e452
commit
e09a24028e
|
@ -379,9 +379,15 @@ configurationRegistry.registerConfiguration({
|
|||
default: false
|
||||
},
|
||||
'debug.inlineValues': {
|
||||
type: 'boolean',
|
||||
type: ['boolean', 'string'],
|
||||
'enum': [true, false, 'auto'],
|
||||
description: nls.localize({ comment: ['This is the description for a setting'], key: 'inlineValues' }, "Show variable values inline in editor while debugging."),
|
||||
default: false
|
||||
'enumDescriptions': [
|
||||
nls.localize('inlineValues.on', 'Always show variable values inline in editor while debugging.'),
|
||||
nls.localize('inlineValues.off', 'Never show variable values inline in editor while debugging.'),
|
||||
nls.localize('inlineValues.focusNoScroll', 'Show variable values inline in editor while debugging when the language supports inline value locations.'),
|
||||
],
|
||||
default: 'auto'
|
||||
},
|
||||
'debug.toolBarLocation': {
|
||||
enum: ['floating', 'docked', 'hidden'],
|
||||
|
|
|
@ -576,8 +576,9 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
|||
const separator = ', ';
|
||||
|
||||
const model = this.editor.getModel();
|
||||
if (!this.configurationService.getValue<IDebugConfiguration>('debug').inlineValues ||
|
||||
!model || !stackFrame || model.uri.toString() !== stackFrame.source.uri.toString()) {
|
||||
const inlineValuesSetting = this.configurationService.getValue<IDebugConfiguration>('debug').inlineValues;
|
||||
const inlineValuesTurnedOn = inlineValuesSetting === true || (inlineValuesSetting === 'auto' && model && InlineValuesProviderRegistry.has(model));
|
||||
if (!inlineValuesTurnedOn || !model || !stackFrame || model.uri.toString() !== stackFrame.source.uri.toString()) {
|
||||
if (!this.removeInlineValuesScheduler.isScheduled()) {
|
||||
this.removeInlineValuesScheduler.schedule();
|
||||
}
|
||||
|
|
|
@ -501,7 +501,7 @@ export interface IDebugConfiguration {
|
|||
allowBreakpointsEverywhere: boolean;
|
||||
openDebug: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart' | 'openOnDebugBreak';
|
||||
openExplorerOnEnd: boolean;
|
||||
inlineValues: boolean;
|
||||
inlineValues: boolean | 'auto';
|
||||
toolBarLocation: 'floating' | 'docked' | 'hidden';
|
||||
showInStatusBar: 'never' | 'always' | 'onFirstSessionStart';
|
||||
internalConsoleOptions: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart';
|
||||
|
|
Loading…
Reference in a new issue