Skip to content

Commit

Permalink
Fix updating breakpoints when debugging starts (#14645)
Browse files Browse the repository at this point in the history
Previously, when starting to debug, the breakpoints did not
move to valid lines. The breakpoints were send to the debug
adapter before configurationDone and some debug adapters
(e. g. python) return updated positions directly. The updates
were not visible in the editor, because the connection was not
marked as initialized yet and events were ignored. The
updates became only visible, when changing breakpoints later.
This commit fixes this.

Fixes #14096

Signed-off-by: Florian Richter <[email protected]>
  • Loading branch information
mvtec-richter authored Jan 9, 2025
1 parent 0036769 commit 6ea0f22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/debug/src/browser/debug-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,12 @@ export class DebugSession implements CompositeTreeElement {
}
this.breakpoints.setExceptionBreakpoints(exceptionBreakpoints);
}
// mark as initialized, so updated breakpoints are shown in editor
this.initialized = true;
await this.updateBreakpoints({ sourceModified: false });
if (this.capabilities.supportsConfigurationDoneRequest) {
await this.sendRequest('configurationDone', {});
}
this.initialized = true;
await this.updateThreads(undefined);
}

Expand Down

0 comments on commit 6ea0f22

Please sign in to comment.