Skip to content

Commit

Permalink
debug: make sure to de-dupe if a session is re-intialized. In case of…
Browse files Browse the repository at this point in the history
… EH debugging we are adding a session again after an attach.

fixes #60809
  • Loading branch information
isidorn committed Oct 18, 2018
1 parent 2f78e29 commit a6c8d96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/parts/debug/common/debugModel.ts
Expand Up @@ -759,7 +759,8 @@ export class DebugModel implements IDebugModel {

public addSession(session: IDebugSession): void {
// Make sure to remove all inactive sessions once a new session is started
this.sessions = this.sessions.filter(s => s.state !== State.Inactive);
// Also make sure to de-dupe if a session is re-intialized. In case of EH debugging we are adding a session again after an attach.
this.sessions = this.sessions.filter(s => s.state !== State.Inactive && s.getId() !== session.getId());
this.sessions.push(session);
this._onDidChangeCallStack.fire();
}
Expand Down

0 comments on commit a6c8d96

Please sign in to comment.