Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 3, 2025

This PR implements the ability to enable and disable breakpoints in the debugger, addressing the need for better breakpoint management during debugging sessions.

Changes Made

Core Functionality

  • Added EnableBreakpoint() and DisableBreakpoint() methods to the DebuggerController API for both absolute addresses and module+offset breakpoints
  • Implemented enabled state tracking in the DebuggerBreakpoints class using an internal map to persist enable/disable state
  • Added corresponding FFI functions (BNDebuggerEnableAbsoluteBreakpoint, BNDebuggerDisableAbsoluteBreakpoint, etc.)
  • Extended the event system with new event types for breakpoint enable/disable operations
  • Updated BNDebuggerGetBreakpoints() to return the correct enabled state instead of hardcoded false

UI Enhancements

  • Enabled Column: Restored and implemented the previously commented-out enabled column in the breakpoints list, displaying ☑/☐ checkboxes
  • Interactive Toggle: Added mouse click support - users can click directly on the enabled column to toggle individual breakpoints
  • Context Menu Actions: Added "Enable Breakpoint", "Disable Breakpoint", and "Toggle Breakpoint Enable/Disable" options
  • Keyboard Shortcut: Implemented Ctrl+Shift+B hotkey for toggling selected breakpoints
  • Multi-selection Support: All enable/disable operations work on multiple selected breakpoints

Behavior

  • Breakpoints are enabled by default when created
  • Disabling a breakpoint removes it from the target debugger but keeps it in the breakpoints list
  • Enabling a disabled breakpoint re-adds it to the target debugger
  • The enabled state persists across debugging sessions through the existing metadata serialization

Example Usage

Users can now:

  1. Right-click on breakpoints in the list to enable/disable them
  2. Click directly on the enabled column (☑/☐) to toggle individual breakpoints
  3. Select multiple breakpoints and use Ctrl+Shift+B to toggle them all
  4. Use context menu for fine-grained control over breakpoint states

This provides much better workflow for debugging scenarios where you want to temporarily disable certain breakpoints without losing them entirely.

Fixes #318.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Copilot Copilot AI changed the title [WIP] Support disabling a breakpoint Support disabling a breakpoint Sep 3, 2025
@Copilot Copilot AI requested a review from xusheng6 September 3, 2025 10:30
Copilot finished work on behalf of xusheng6 September 3, 2025 10:30
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.

Support disabling a breakpoint
3 participants