Skip to content

Commit

Permalink
fixes #80014
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman committed Aug 30, 2019
1 parent 7e5adb5 commit 54b3b7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/debug/browser/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,8 @@ export class DebugSession implements IDebugSession {

this.rawListeners.push(this.raw.onDidBreakpoint(event => {
const id = event.body && event.body.breakpoint ? event.body.breakpoint.id : undefined;
const breakpoint = this.model.getBreakpoints().filter(bp => bp.idFromAdapter === id).pop();
const functionBreakpoint = this.model.getFunctionBreakpoints().filter(bp => bp.idFromAdapter === id).pop();
const breakpoint = this.model.getBreakpoints().filter(bp => bp.getIdFromAdapter(this.getId()) === id).pop();
const functionBreakpoint = this.model.getFunctionBreakpoints().filter(bp => bp.getIdFromAdapter(this.getId()) === id).pop();

if (event.body.reason === 'new' && event.body.breakpoint.source && event.body.breakpoint.line) {
const source = this.getSource(event.body.breakpoint.source);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/common/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export interface IBaseBreakpoint extends IEnablement {
readonly hitCondition?: string;
readonly logMessage?: string;
readonly verified: boolean;
readonly idFromAdapter: number | undefined;
getIdFromAdapter(sessionId: string): number | undefined;
}

export interface IBreakpoint extends IBaseBreakpoint {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/debug/common/debugModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ export class BaseBreakpoint extends Enablement implements IBaseBreakpoint {
return data ? data.verified : true;
}

get idFromAdapter(): number | undefined {
const data = this.getSessionData();
getIdFromAdapter(sessionId: string): number | undefined {
const data = this.sessionData.get(sessionId);
return data ? data.id : undefined;
}

Expand Down

0 comments on commit 54b3b7f

Please sign in to comment.