fix(vscode): wait for source maps before running debugged tests - #80
Merged
Merged
Conversation
CI reproduction passed 28/30 runs with Node defaults and 30/30 with source-map pauses. Failing traces show no pool-child instrumentation pause and a breakpoint installed after the target line ran. The passing reference pauses before execution and hits the same generated location. Wait for source maps so in-memory Rstest bundles cannot outrun TypeScript breakpoint binding. Closes #79
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Debugging a test from Test Explorer could run past a TypeScript breakpoint. Rstest runs in-memory compiled test files with inline source maps, and js-debug's Node launch defaults to
pauseForSourceMap: false. The pool child then executes the test script as soon as it is parsed, while js-debug is still mapping the TS breakpoint onto it. On a slow run the line executes before the breakpoint is installed.The generated debug launch now sets
pauseForSourceMap: true. js-debug holds each script with a source map until its breakpoints are bound. This only affects debug runs.Evidence, from a temporary macOS CI experiment running the breakpoint E2E on a fresh VS Code host each time:
pauseForSourceMap: true: 30/30 passed. The trace shows the instrumentation pause holding the test script until the breakpoint is set, then the breakpoint hit.Related Links
Checklist