mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
parent
b8ec1d7733
commit
38aa476610
2 changed files with 4 additions and 3 deletions
|
@ -479,11 +479,11 @@ export class DebugService implements IDebugService {
|
|||
});
|
||||
}
|
||||
|
||||
private launchOrAttachToSession(session: IDebugSession, focus = true): Promise<void> {
|
||||
private launchOrAttachToSession(session: IDebugSession, forceFocus = false): Promise<void> {
|
||||
const dbgr = this.configurationManager.getDebugger(session.configuration.type);
|
||||
return session.initialize(dbgr!).then(() => {
|
||||
return session.launchOrAttach(session.configuration).then(() => {
|
||||
if (focus) {
|
||||
if (forceFocus || !this.viewModel.focusedSession) {
|
||||
this.focusStackFrame(undefined, undefined, session);
|
||||
}
|
||||
});
|
||||
|
@ -572,7 +572,7 @@ export class DebugService implements IDebugService {
|
|||
return runTasks().then(taskResult => taskResult === TaskRunResult.Success ? this.extensionHostDebugService.reload(session.getId()) : undefined);
|
||||
}
|
||||
|
||||
const shouldFocus = this.viewModel.focusedSession && session.getId() === this.viewModel.focusedSession.getId();
|
||||
const shouldFocus = !!this.viewModel.focusedSession && session.getId() === this.viewModel.focusedSession.getId();
|
||||
// If the restart is automatic -> disconnect, otherwise -> terminate #55064
|
||||
return (isAutoRestart ? session.disconnect(true) : session.terminate(true)).then(() => {
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution {
|
|||
private registerListeners(): void {
|
||||
this._register(this.debugService.onDidChangeState(() => this.updateScheduler.schedule()));
|
||||
this._register(this.debugService.getViewModel().onDidFocusSession(() => this.updateScheduler.schedule()));
|
||||
this._register(this.debugService.onDidNewSession(() => this.updateScheduler.schedule()));
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => this.onDidConfigurationChange(e)));
|
||||
this._register(this.actionBar.actionRunner.onDidRun((e: IRunEvent) => {
|
||||
// check for error
|
||||
|
|
Loading…
Reference in a new issue