Skip to content

Commit

Permalink
[debug] ignore additional breakpoints returned by setBreakpoints re…
Browse files Browse the repository at this point in the history
…quest

otherwise it fails `undefined` and swallows updates for other breakpoints

Signed-off-by: Anton Kosyakov <[email protected]>
  • Loading branch information
akosyakov committed Sep 4, 2019
1 parent fef4e8d commit f9064a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/debug/src/browser/debug-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ export class DebugSession implements CompositeTreeElement {
sourceModified,
breakpoints: enabled.map(({ origin }) => origin.raw)
});
response.body.breakpoints.map((raw, index) => enabled[index].update({ raw }));
response.body.breakpoints.map((raw, index) => {
// node debug adapter returns more breakpoints sometimes
if (enabled[index]) {
enabled[index].update({ raw });
}
});
} catch (error) {
// could be error or promise rejection of DebugProtocol.SetBreakpointsResponse
if (error instanceof Error) {
Expand Down

0 comments on commit f9064a6

Please sign in to comment.