提交 be947391 编写于 作者: I isidor

debug: anounce file name and line number when stopped

#3009
上级 3010d4c4
......@@ -235,7 +235,6 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
this.toDispose.push(this.session.addListener2(debug.SessionEvents.STOPPED, (event: DebugProtocol.StoppedEvent) => {
this.setStateAndEmit(debug.State.Stopped);
aria.alert(nls.localize('programStopped', "Program stopped, reason {0}.", event.body.reason));
const threadId = event.body.threadId;
this.getThreadData(threadId).then(() => {
......@@ -245,6 +244,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
this.windowService.getWindow().focus();
const callStack = this.model.getThreads()[threadId].callStack;
if (callStack.length > 0) {
aria.alert(nls.localize('programStopped', "Program stopped, reason {0}, {1} {2}", event.body.reason, callStack[0].source.name, callStack[0].lineNumber));
this.setFocusedStackFrameAndEvaluate(callStack[0]);
this.openOrRevealEditor(callStack[0].source, callStack[0].lineNumber, false, false).done(null, errors.onUnexpectedError);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册