提交 a5ba48b7 编写于 作者: I isidor

debug: distinguish if there is a process left on session end

fixes #14332
上级 608309dc
......@@ -559,6 +559,7 @@ export class Process implements debug.IProcess {
}
}
// TODO@Isidor breakpoint should not have a pointer to source. Source should live inside a stack frame
export class Breakpoint implements debug.IBreakpoint {
public lineNumber: number;
......
......@@ -804,25 +804,26 @@ export class DebugService implements debug.IDebugService {
// an internal module might be open so the dispose can throw -> ignore and continue with stop session.
}
this.partService.removeClass('debugging');
this.model.removeProcess(session.getId());
this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError);
this.setStateAndEmit(session.getId(), debug.State.Inactive);
// set breakpoints back to unverified since the session ended.
// source reference changes across sessions, so we do not use it to persist the source.
const data: { [id: string]: { line: number, verified: boolean } } = {};
this.model.getBreakpoints().forEach(bp => {
delete bp.source.raw.sourceReference;
data[bp.getId()] = { line: bp.lineNumber, verified: false };
});
this.model.updateBreakpoints(data);
if (this.model.getProcesses().length === 0) {
this.partService.removeClass('debugging');
// set breakpoints back to unverified since the session ended.
// source reference changes across sessions, so we do not use it to persist the source.
const data: { [id: string]: { line: number, verified: boolean } } = {};
this.model.getBreakpoints().forEach(bp => {
delete bp.source.raw.sourceReference;
data[bp.getId()] = { line: bp.lineNumber, verified: false };
});
this.model.updateBreakpoints(data);
this.inDebugMode.reset();
this.inDebugMode.reset();
if (!this.partService.isSideBarHidden() && this.configurationService.getConfiguration<debug.IDebugConfiguration>('debug').openExplorerOnEnd) {
this.viewletService.openViewlet(EXPLORER_VIEWLET_ID).done(null, errors.onUnexpectedError);
if (!this.partService.isSideBarHidden() && this.configurationService.getConfiguration<debug.IDebugConfiguration>('debug').openExplorerOnEnd) {
this.viewletService.openViewlet(EXPLORER_VIEWLET_ID).done(null, errors.onUnexpectedError);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册