提交 15ac8564 编写于 作者: I isidor

fixes #62202

上级 f97a4b48
......@@ -113,12 +113,14 @@ class RunToCursorAction extends EditorAction {
public run(accessor: ServicesAccessor, editor: ICodeEditor): TPromise<void> {
const debugService = accessor.get(IDebugService);
if (debugService.state !== State.Stopped) {
const focusedSession = debugService.getViewModel().focusedSession;
if (debugService.state !== State.Stopped || !focusedSession) {
return Promise.resolve(null);
}
let breakpointToRemove: IBreakpoint;
const oneTimeListener = debugService.onDidChangeState(state => {
const oneTimeListener = focusedSession.onDidChangeState(() => {
const state = focusedSession.state;
if (state === State.Stopped || state === State.Inactive) {
if (breakpointToRemove) {
debugService.removeBreakpoints(breakpointToRemove.getId());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册