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

New breakpoint API/UI #1388

Open
mfussenegger opened this issue Dec 5, 2024 · 7 comments
Open

New breakpoint API/UI #1388

mfussenegger opened this issue Dec 5, 2024 · 7 comments

Comments

@mfussenegger
Copy link
Owner

mfussenegger commented Dec 5, 2024

Problem Statement

Possible Solutions

Nothing set in stone, but rough plan:

  • New API:

    • dap.bp.get(opts) with filters
    • dap.bp.set(opts) (TDB if this can cover data breakpoints and method breakpoints)
    • dap.bp.jump([count])
  • New dap-breakpoints:// virtual buffer

    • Lists all breakpoints including their conditions
    • Supports inline edits
    • :w to save changes (updating conditions, deleting them)
  • Extend :DapBreakpoint user commands to either:

    • Edit existing condition/logpoints
    • Toggle

Considered Alternatives

No response

@przepompownia
Copy link

Two additional thoughts at the moment to consider:

  • inactive breakpoints - removed for the adapter, still kept on the nvim-dap side, possible to reactivate later (I hope I didn't miss something existing),

  • dap.bp.jump([step]) - could cycle modulo the count of (active) breakpoints.

@mfussenegger
Copy link
Owner Author

mfussenegger commented Dec 5, 2024

inactive breakpoints - removed for the adapter, still kept on the nvim-dap side, possible to reactivate later (I hope I didn't miss something existing),

I'm not too keen on this because of its UI implications. Going from present/absent to present/inactive/absent requires additional toggle options. I have so far never wanted it or missed it given how easy it is to re-add one, but I'll keep it in mind

@przepompownia
Copy link

Adding it back is easy, as long as I remember where it was…

It's easy for me to forget it as I delve into a stack of rarely visited places, searching for a target breakpoint, but leaving a few intermediate breakpoints behind (for use if the deepest one turned out to be positioned incorrectly). Most of these intermediate breakpoints could be inactive for me in such case.

@asmodeus812

This comment was marked as off-topic.

@mfussenegger

This comment was marked as off-topic.

@asmodeus812

This comment was marked as off-topic.

@sleeptightAnsiC
Copy link

sleeptightAnsiC commented Jan 18, 2025

There are some feature requests in nvim-dap-ui that partially would benefit from those API changes:

cc @mfussenegger

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

No branches or pull requests

4 participants