Skip to content

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

@mfussenegger
Copy link
Owner

Thanks, I'll integrate something like this as part of #1388

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.

2 participants