Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Fix some unexplained breakpoints behavior #296

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/chrome/chromeDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1193,14 +1193,19 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter {
});
}

private generateNextUnboundBreakpointId(): string {
const unboundBreakpointUniquePrefix = "__::[vscode_chrome_debug_adapter_unbound_breakpoint]::";
return `${unboundBreakpointUniquePrefix}${this._nextUnboundBreakpointId++}`;
}

private unverifiedBpResponse(args: ISetBreakpointsArgs, requestSeq: number, message?: string, bpsSet = false): ISetBreakpointsResponseBody {
const breakpoints = args.breakpoints.map(bp => {
return <DebugProtocol.Breakpoint>{
verified: false,
line: bp.line,
column: bp.column,
message,
id: this._breakpointIdHandles.create(this._nextUnboundBreakpointId++ + '')
id: this._breakpointIdHandles.create(this.generateNextUnboundBreakpointId())
};
});

Expand Down Expand Up @@ -1337,7 +1342,7 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter {

// response.breakpointId is undefined when no target BP is backing this BP, e.g. it's at the same location
// as another BP
const responseBpId = response.breakpointId || (this._nextUnboundBreakpointId++ + '');
const responseBpId = response.breakpointId || this.generateNextUnboundBreakpointId();

let bpId: number;
if (ids && ids[i]) {
Expand Down