You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DAP: a stop at a breakpoint that the debug adapter moved is not reported as a breakpoint stop when the adapter sends no hitBreakpointIds #1999
Debug adapters often move a breakpoint to the nearest line with code, for example from a blank line or a comment. When the adapter then stops there and its stopped event has no hitBreakpointIds, LSP4IJ doesn't find the IntelliJ breakpoint and reports the stop as a plain position (positionReached), not as a breakpoint stop (breakpointReached).
debugpy does both. Claude Code reproduced it at the protocol level with the debugpy bundled in IntelliJ IDEA 2026.3:
defrun():
total=0# line 3: blank# comment # line 4foriinrange(3):
setBreakpoints for lines 3 and 4 is answered with [{"verified": true, "id": 0, "line": 2}, {"verified": true, "id": 1, "line": 2}]. The stopped event has reason: "breakpoint", no hitBreakpointIds, and the top frame is on line 2.
What the user sees
The program stops at the right place, and the breakpoint is shown as verified. But since IntelliJ doesn't learn which breakpoint stopped it:
"Breakpoint hit" message, "Stack trace" and "Evaluate and log" of a suspending breakpoint are not shown.
"Remove once hit" doesn't remove the breakpoint, and breakpoints that wait for this one ("Disable until hitting the following breakpoint") stay disabled.
A breakpoint with "Suspend" off and no log message (for example only "Stack trace") is sent without logMessage, so the adapter stops, and the IDE suspends although "Suspend" is off.
Cause
On main, the results of setBreakpoints are mapped by position, and a stop with hitBreakpointIds is mapped by id. Without ids, getStopBreakpoint falls back to findBreakpoint(topFrame), which compares the frame's line with the line of the IntelliJ breakpoint (line 475), not with the line the adapter moved it to. So no breakpoint is found, and positionReached is called.
This is not new in 0.30.0, so it's not a blocker for the release.
Fix
A PR is in progress: remember on each IntelliJ breakpoint the line that the adapter answered in setBreakpoints, and let the stop lookup without hitBreakpointIds also match that line. A breakpoint that was not moved wins over a moved one on the same line.
An earlier version of this fix was checked in IntelliJ IDEA 2026.3 EAP with the debugpy bundled with the IDE, with a DAP breakpoint on the blank line 3 and "Breakpoint hit" turned on:
The breakpoint on line 3 is verified, although debugpy moved it to line 2:
The session stops on line 2:
The console shows "Breakpoint reached: moved.py:3". IntelliJ prints this only when the stop is reported with breakpointReached for that breakpoint. On main this line is missing, since the stop is reported with positionReached:
Activity
fix(dap): bring the debugger to the front when any kind of breakpoint…
fix(dap): find the breakpoint of a stop without `hitBreakpointIds` al…