mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
proper fix for #14711
This commit is contained in:
@@ -71,7 +71,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame(() => {
|
||||
this.toDispose.push(this.debugService.onDidChangeState(() => {
|
||||
this.update();
|
||||
}));
|
||||
this.toDispose.push(this.actionBar.actionRunner.addListener2(events.EventType.RUN, (e: any) => {
|
||||
|
||||
@@ -439,9 +439,11 @@ export class DebugService implements debug.IDebugService {
|
||||
return !!this.contextService.getWorkspace();
|
||||
}
|
||||
|
||||
public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise<void> {
|
||||
public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame, process?: debug.IProcess): TPromise<void> {
|
||||
const processes = this.model.getProcesses();
|
||||
const process = focusedStackFrame ? focusedStackFrame.thread.process : processes.length ? processes[0] : null;
|
||||
if (!process) {
|
||||
process = focusedStackFrame ? focusedStackFrame.thread.process : processes.length ? processes[0] : null;
|
||||
}
|
||||
if (process && !focusedStackFrame) {
|
||||
const thread = process.getAllThreads().pop();
|
||||
const callStack = thread ? thread.getCachedCallStack() : null;
|
||||
@@ -635,7 +637,7 @@ export class DebugService implements debug.IDebugService {
|
||||
const process = this.model.addProcess(configuration.name, session);
|
||||
|
||||
if (!this.viewModel.focusedProcess) {
|
||||
this.viewModel.setFocusedStackFrame(null, process);
|
||||
this.setFocusedStackFrameAndEvaluate(null, process);
|
||||
}
|
||||
this.toDisposeOnSessionEnd[session.getId()] = [];
|
||||
if (client) {
|
||||
|
||||
Reference in New Issue
Block a user