提交 a2dddb22 编写于 作者: I isidor

proper fix for #14711

上级 7b0c4a60
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册