Repository navigation
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.108.1
- OS Version: Windows 11
The current issue was identified in the context of developing a debugger extension that uses the Debug Adapter Protocol.
Steps to Reproduce:
-
Open the Disassembly view during a debug session.
-
Set an instruction breakpoint on a specific line.
-
Trigger an action that causes the instruction reference for that memory location to change or refresh (e.g., reloading symbols or certain stepping operations).
-
Click the breakpoint icon to remove it.
-
Result: The breakpoint remains active and cannot be toggled off by clicking.
Technical Analysis:
The issue stems from how breakpoints are identified during the removal flow:
- Storage: Instruction breakpoints are stored as InstructionBreakpoint objects containing instructionReference, offset, and address.
- Trigger: When clicking a breakpoint in the Disassembly view (disassemblyView.ts L727), removeInstructionBreakpoints() is called using the current element's instruction reference and offset.
- The Failure: The logic in debugModel.ts L2072 attempts to find the breakpoint by matching these two fields. If the instruction reference has changed, the lookup fails, and the breakpoint is never removed from the model.
Proposed Solution:
Instead of matching against the volatile instructionReference and offset, the search should be performed using the address.
I suggest updating the removeInstructionBreakpoints() signature to include the address or refactoring the search logic to prioritize the address as a unique identifier for breakpoints within the current disassembly session.
Activity
fix(debug): identify instruction breakpoints by resolved address to a…
Merge pull request #310763 from maruthang/fix/issue-289678-disassembl…