未验证 提交 8172b293 编写于 作者: I Isidor Nikolic 提交者: GitHub

Merge pull request #49936 from Krzysztof-Cieslak/debugOpenOnBreakpoint

Add openOnDebugBreak for openDebug
......@@ -347,7 +347,7 @@ export enum State {
export interface IDebugConfiguration {
allowBreakpointsEverywhere: boolean;
openDebug: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart';
openDebug: 'neverOpen' | 'openOnSessionStart' | 'openOnFirstSessionStart' | 'openOnDebugBreak';
openExplorerOnEnd: boolean;
inlineValues: boolean;
hideActionBar: boolean;
......
......@@ -206,7 +206,7 @@ configurationRegistry.registerConfiguration({
},
'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
'debug.openDebug': {
enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart'],
enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart', 'openOnDebugBreak'],
default: 'openOnFirstSessionStart',
description: nls.localize('openDebug', "Controls whether debug view should be open on debugging session start.")
},
......
......@@ -85,6 +85,7 @@ export class DebugService implements debug.IDebugService {
private skipRunningTask: boolean;
private previousState: debug.State;
private fetchThreadsSchedulers: Map<string, RunOnceScheduler>;
private openDebugOptions: "neverOpen" | "openOnSessionStart" | "openOnFirstSessionStart" | "openOnDebugBreak";
constructor(
@IStorageService private storageService: IStorageService,
......@@ -272,6 +273,9 @@ export class DebugService implements debug.IDebugService {
this.focusStackFrame(stackFrameToFocus);
if (thread.stoppedDetails) {
if (this.openDebugOptions === 'openOnDebugBreak') {
this.viewletService.openViewlet(debug.VIEWLET_ID);
}
this.windowService.focusWindow();
aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", thread.stoppedDetails.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber));
}
......@@ -936,9 +940,9 @@ export class DebugService implements debug.IDebugService {
this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError);
}
const openDebugOptions = this.configurationService.getValue<debug.IDebugConfiguration>('debug').openDebug;
this.openDebugOptions = this.configurationService.getValue<debug.IDebugConfiguration>('debug').openDebug;
// Open debug viewlet based on the visibility of the side bar and openDebug setting
if (openDebugOptions === 'openOnSessionStart' || (openDebugOptions === 'openOnFirstSessionStart' && this.firstSessionStart)) {
if (this.openDebugOptions === 'openOnSessionStart' || (this.openDebugOptions === 'openOnFirstSessionStart' && this.firstSessionStart)) {
this.viewletService.openViewlet(debug.VIEWLET_ID);
}
this.firstSessionStart = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册