Skip to content

Commit 888f86f

Browse files
committed
null guard
1 parent 689e2fd commit 888f86f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/vs/workbench/contrib/debug/browser/debugSession.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ export class DebugSession implements IDebugSession {
381381
if (this.raw) {
382382
const source = this.getRawSource(uri);
383383
const response = await this.raw.breakpointLocations({ source, line: lineNumber });
384+
if (!response.body || !response.body.breakpoints) {
385+
return [];
386+
}
387+
384388
const positions = response.body.breakpoints.map(bp => ({ lineNumber: bp.line, column: bp.column || 1 }));
385389

386390
return distinct(positions, p => `${p.lineNumber}:${p.column}`);

0 commit comments

Comments
 (0)