fix(#255): correct the continue-re-stop diagnosis — multi-location macro breakpoints - #277
Merged
Merged
Conversation
…cro breakpoints The strict non-win32 reproducer added in #274 fails on Linux: it asserts that one continue from a breakpoint at hello_world/src/main.rs:26 runs the program to completion. Line 26 is `let message = format!(...)`, and the `format!` expansion inlines several call sites onto that one source line, so LLDB plants a breakpoint location at each — the setBreakpoints response reports "Resolved locations: 3". Each continue advances to the next location, so the session re-pauses on the same file:line with the same breakpoint id at a different program counter, and the line takes three continues to leave. Confirmed with a raw DAP client driving the vendored CodeLLDB directly, with mcp-debugger out of the loop: line 26 needs 3 continues, while single-statement lines (13, 42) need exactly 1. So this is normal LLDB multi-location behavior on every platform — not a Windows defect, not symbol-format-specific, and not ours. The earlier "Linux is clean" note simply reflected that nothing had ever continued past a user breakpoint on Linux. - smoke-rust: replace the wrong-premise reproducer with two tests — one single-location line that must complete in exactly one continue (the coverage gap that let this survive), and one macro line that must drain its locations, stay on line 26 in between, and then complete. Both run on all platforms; the win32 special-casing is gone. - rust.md: rewrite the #255 quirk and troubleshooting row to describe multi-location breakpoints instead of a Windows-only re-hit bug. - breakpoint-management / smoke-restart: correct the comments on their step_over calls; behavior left alone since Windows can't be tested here. Refs #255
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Verified on the platform this PR could not exercise: all 4 tests in tests/e2e/mcp-server-smoke-rust.test.ts pass on Windows 11 (GNU toolchain, CodeLLDB 1.11.8) — the single-location line-42 test completes in exactly one continue, and the line-26 macro test drains its locations and exits 0. This confirms the diagnosis on Windows: the re-stop follows breakpoint-location count, not the OS. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…gnosis - smoke-rust: retire the leftover "Windows re-hits the breakpoint on continue" parenthetical in scenario A — the no-continue rationale now points at the multi-location drain the new test below pins. - breakpoint-management: the step-6 guard comment attributed the win32 step_over to multi-location resolution, but all breakpoints are cleared (count asserted 0) at that point — it actually guards the removal-sync race the header docblock describes. - rust.md: note that a line's location count is toolchain-dependent (same format! line: 1 location under rustc 1.83, 3 under 1.91), reconciling issue #255's 2026-08-04 Linux single-continue experiment (docker rust:1.83) with the 3-location Ubuntu validation (rustc 1.91). Windows leg verified for this PR: all 4 smoke-rust tests pass on Windows 11 / GNU / CodeLLDB 1.11.8, including single-continue at the single-location line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Validating the Rust trio (#272/#273/#274/#276) on Ubuntu surfaced a failing test on
main: the strict non-win32 reproducer added in #274 asserts that onecontinue_executionfrom a breakpoint atexamples/rust/hello_world/src/main.rs:26runs the program to completion. It does not, on Linux — but not because of the bug #255 describes.Root cause
Line 26 is
let message = format!("Language: {}, Version: {}", name, version);. Theformat!expansion inlines several call sites onto that one source line, so LLDB plants a breakpoint location at each — thesetBreakpointsresponse saysResolved locations: 3. Each continue advances to the next location, so the session re-pauses on the samefile:line, with the same breakpoint id, at a different program counter. The line takes three continues to leave.Confirmed with a raw DAP client driving the vendored CodeLLDB directly (mcp-debugger entirely out of the loop):
let message = format!(...)let name = "Rust";let sum = a + b;Each intermediate stop reports
reason: "breakpoint",hitBreakpointIds: [1],line: 26,col: 19— at PCs…C6FF,…C73A, then termination. Also ruled out the #236 post-stopsetBreakpointsre-sync by disabling it: no change.So this is ordinary LLDB multi-location behavior on every platform — not Windows-specific, not MSVC/PDB-specific, and not ours. The prior "Linux remains clean" note only held because nothing in the suite had ever continued past a user breakpoint on Linux, which is the exact gap #274 set out to close.
Changes
tests/e2e/mcp-server-smoke-rust.test.ts— replaces the wrong-premise reproducer with two tests sharing one launch helper, both running on all platforms (the win32 special-casing and itsstep_overworkaround are gone):skills/debugging/references/rust.md— the quirk bullet and troubleshooting row described a Windows-only re-hit bug with astep_overworkaround; they now describe multi-location macro breakpoints and the correct guidance (keep continuing, orstep_overonce to cross the whole line).mcp-server-breakpoint-management.test.ts/mcp-server-smoke-restart.test.ts— comments corrected. Behavior deliberately untouched: both already tolerate multi-location stops (one clears breakpoints first, the other loops), and Windows can't be exercised from this machine.Testing (Ubuntu 24.04, x86_64, CodeLLDB 1.11.8, rustc 1.91.1)
mcp-server-smoke-rust4/4,mcp-server-breakpoint-management8/8,mcp-server-smoke-restart8/8LEAK_GUARD_STRICT=1: 2852 passedAlso verified on Linux while here (no changes needed)
test:ci-coverageis--project unit --project integration, so no e2e runs in CI at all. The panic trio passes; Linux matches the Windows capture exactly — stopped body{"allThreadsStopped":true,"hitBreakpointIds":[1],"reason":"breakpoint","threadId":…}with no description/text, session reporting{reason: 'exception', rawReason: 'breakpoint'}. An ordinary user breakpoint still reportsbreakpoint, so the id-disjointness discriminator does not false-positive here.linux-x64CodeLLDB (the new unit tests are hermetic and can't show this).stopReason: 'pause',rawStopReason: 'exception'.'unknown'fallback — 42 e2e tests across python/javascript/go/java/ruby/dotnet/mock/restart/logpoints/breakpoint-management, all green.Closes #255
🤖 Generated with Claude Code