Skip to content

Commit 73bf424

Browse files
author
Anton Vildyaev
committed
Rename to openDebugOnStart
1 parent d08a3eb commit 73bf424

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export const INTERNAL_CONSOLE_OPTIONS_SCHEMA = {
4747
default: 'openOnFirstSessionStart',
4848
description: nls.localize('internalConsoleOptions', "Controls behavior of the internal debug console.")
4949
};
50-
export const DEBUG_VIEWLET_OPTIONS_SCHEMA = {
50+
export const OPEN_DEBUG_OPTIONS_SCHEMA = {
5151
enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart'],
5252
default: 'openOnFirstSessionStart',
53-
description: nls.localize('debugViewletOptions', "Controls whether debug viewlet should be open on debugging session start.")
53+
description: nls.localize('openDebugOnStart', "Controls whether debug viewlet should be open on debugging session start.")
5454
};
5555

5656
// raw
@@ -324,11 +324,11 @@ export enum State {
324324

325325
export interface IDebugConfiguration {
326326
allowBreakpointsEverywhere: boolean;
327+
openDebugOnStart: string;
327328
openExplorerOnEnd: boolean;
328329
inlineValues: boolean;
329330
hideActionBar: boolean;
330331
internalConsoleOptions: string;
331-
debugViewletOptions: string;
332332
}
333333

334334
export interface IGlobalConfig {
@@ -342,7 +342,6 @@ export interface IEnvConfig {
342342
type: string;
343343
request: string;
344344
internalConsoleOptions?: string;
345-
debugViewletOptions?: string;
346345
preLaunchTask?: string;
347346
__restart?: any;
348347
__sessionId?: string;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { VariablesView, WatchExpressionsView, CallStackView, BreakpointsView } f
2020
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
2121
import {
2222
IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE, INTERNAL_CONSOLE_OPTIONS_SCHEMA,
23-
CONTEXT_DEBUG_STATE, VARIABLES_VIEW_ID, CALLSTACK_VIEW_ID, WATCH_VIEW_ID, BREAKPOINTS_VIEW_ID, DEBUG_VIEWLET_OPTIONS_SCHEMA
23+
CONTEXT_DEBUG_STATE, VARIABLES_VIEW_ID, CALLSTACK_VIEW_ID, WATCH_VIEW_ID, BREAKPOINTS_VIEW_ID, OPEN_DEBUG_OPTIONS_SCHEMA
2424
} from 'vs/workbench/parts/debug/common/debug';
2525
import { IPartService } from 'vs/workbench/services/part/common/partService';
2626
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
@@ -188,7 +188,7 @@ configurationRegistry.registerConfiguration({
188188
default: false
189189
},
190190
'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
191-
'debug.debugViewletOptions': DEBUG_VIEWLET_OPTIONS_SCHEMA,
191+
'debug.openDebugOnStart': OPEN_DEBUG_OPTIONS_SCHEMA,
192192
'launch': {
193193
type: 'object',
194194
description: nls.localize({ comment: ['This is the description for a setting'], key: 'launch' }, "Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces"),

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,11 @@ export class DebugService implements debug.IDebugService {
872872
this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError);
873873
}
874874

875-
const debugViewletOptions = configuration.debugViewletOptions || this.configurationService.getConfiguration<debug.IDebugConfiguration>('debug').debugViewletOptions;
876-
// Open debug viewlet based on the visibility of the side bar and debugViewletOptions setting
875+
const openDebugOptions = this.configurationService.getConfiguration<debug.IDebugConfiguration>('debug').openDebugOnStart;
876+
// Open debug viewlet based on the visibility of the side bar and openDebugOnStart setting
877877
if ((this.partService.isVisible(Parts.SIDEBAR_PART) || this.contextService.getWorkbenchState() === WorkbenchState.EMPTY)
878-
&& ((debugViewletOptions === 'openOnSessionStart')
879-
|| (debugViewletOptions === 'openOnFirstSessionStart' && !this.viewModel.changedWorkbenchViewState))) {
878+
&& ((openDebugOptions === 'openOnSessionStart')
879+
|| (openDebugOptions === 'openOnFirstSessionStart' && !this.viewModel.changedWorkbenchViewState))) {
880880
this.viewModel.changedWorkbenchViewState = true;
881881
this.viewletService.openViewlet(debug.VIEWLET_ID);
882882
}

0 commit comments

Comments
 (0)