debug: only remove process on error if the disconnect is not being called

This commit is contained in:
isidor
2018-03-09 13:48:44 +01:00
parent 7f45076568
commit da2ec0784d
@@ -966,10 +966,10 @@ export class DebugService implements debug.IDebugService {
this.updateStateAndEmit(session.getId(), debug.State.Inactive);
if (!session.disconnected) {
session.disconnect().done(null, errors.onUnexpectedError);
}
if (process) {
} else if (process) {
this.model.removeProcess(process.getId());
}
// Show the repl if some error got logged there #5870
if (this.model.getReplElements().length > 0) {
this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError);