Skip to content

fix(#467): surface unbound breakpoints at exit; auto-qualify go's bare 'main' - #484

Merged
debugmcpdev merged 1 commit into
mainfrom
fix/467-unbound-bp-surfacing
Aug 25, 2026
Merged

fix(#467): surface unbound breakpoints at exit; auto-qualify go's bare 'main'#484
debugmcpdev merged 1 commit into
mainfrom
fix/467-unbound-bp-surfacing

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Closes #467.

Case 1 — the run that silently didn't work now says so

A launch that ends in stopped with breakpoints that never bound gets a warning on the start_debugging response listing each unbound breakpoint with the diagnostic the store already holds (e.g. CodeLLDB's "a valid location was found at …" path suggestion the issue highlighted). Built only at ran-to-completion — where unverified means never-will-bind even for bind-late adapters — so it cannot false-positive on js/java's designed late binding. Stored js-debug l10n keys are translated before surfacing (#471's normalizer).

Case 2 — a breakpoint the server knows is dead is fixed instead of stored

New policy hook normalizeFunctionBreakpointName (issue options 1+2 composed): a name the policy is certain can never bind as given is rewritten, and the response says so. Go rewrites bare mainmain.main — the qualification is certain because func main must live in package main — returning requestedName: "main", functionName: "main.main", and a warning explaining the rewrite. Other bare names keep the existing advisory hint (their package isn't knowable), unqualified-but-uncertain stays warn-only.

Verification (live)

  • go set_breakpoint {function: "main"} + launch → binds and pauses at main.main (previously ran to completion with a dead breakpoint in the list).
  • js launch with a breakpoint in a never-loaded file → state: "stopped" + warning: "1 breakpoint(s) never bound during this run: attach_target.js:5 (Unbound breakpoint). The program ran to completion without stopping there — …".
  • New unit tests: exit-warning builder (4 cases), server-level normalization pass-through + hint fallback, go policy pin. Full unit suites green.

🤖 Generated with Claude Code

…e 'main'

Case 1: a launch that ends in STOPPED with breakpoints that never bound
now says so in the start_debugging response warning, listing each
breakpoint with the diagnostic the store already holds (e.g. CodeLLDB's
valid-location path suggestion). Built only at ran-to-completion, where
unverified means never-will-bind even for bind-late adapters — zero
false positives.

Case 2: a bare function-breakpoint name the policy KNOWS can never bind
is rewritten instead of stored as a permanently dead breakpoint. New
policy hook normalizeFunctionBreakpointName; go rewrites 'main' ->
'main.main' (func main must live in package main, so the qualification
is certain) and the response carries requestedName + a warning saying
the rewrite happened. Other bare names keep the advisory hint — their
package is not knowable.

Verified live: go set_breakpoint {function:"main"} now binds and stops
at main.main (previously ran to completion); a js launch with a
never-loaded file's breakpoint returns the unbound warning on the
start_debugging response.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/server.ts 90.90% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit 77af1f2 into main Aug 25, 2026
10 checks passed
@debugmcpdev
debugmcpdev deleted the fix/467-unbound-bp-surfacing branch August 25, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breakpoint-binding failures are under-surfaced: start_debugging hides unbound breakpoints, and known-never-bind function breakpoints are still accepted

2 participants