Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow DapToggleBreakpoint for placing conditional breakpoints #1325

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sleeptightAnsiC
Copy link

@sleeptightAnsiC sleeptightAnsiC commented Aug 27, 2024

Hi,

I was looking for a way of creating conditional breakpoints through user commands and the easiest solution is to allow DapToggleBreakpoint to take additional args and pass them all as condition into dap.toggle_breakpoint. Since user can place two types of BPs now, I also made sure said command only removes BP when invoked with the same condition, in other cases it replaces the BP which is intuitive when you wish to change the condition or turn un-conditional BP into the conditional one.

The only problem I'm a bit concerned about is that when you have a conditional BP, calling :DapToggleBreakpoint (without args) would change it into un-conditional one (instead of removing) which might be a bit confusing. I could adjust this so calling command without args at existing BP would always disable it, no matter condition. But I think this is just a minor inconvenience and depends on preference.

Cheers!

Relates: #670

2024-08-27_19-11-50.mp4

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.

1 participant