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

feature: interface for adding breakpoint conditions #414

Open
shmerl opened this issue Dec 20, 2024 · 2 comments
Open

feature: interface for adding breakpoint conditions #414

shmerl opened this issue Dec 20, 2024 · 2 comments

Comments

@shmerl
Copy link

shmerl commented Dec 20, 2024

Currently to add a conditional breakpoint, you'd have to explicitly use nvim-dap's API on a given line, for example:

:lua require('dap').set_breakpoint('foo == 15')

While nvim-dap-ui shows the condition of the breakpoint in its DAP Breakpoints element (window), it doesn't allow modifying it or adding new one from there.

It would be a nice feature to be able to set or edit that condition from the breakpoints window.

@sleeptightAnsiC
Copy link
Contributor

sleeptightAnsiC commented Jan 7, 2025

This part of API will be changed in the nvim-dap upstream soon
mfussenegger/nvim-dap#1388
Might be worth to wait till said change is done.
Perhaps, nvim-dap will add UI functionality for this.

@sleeptightAnsiC
Copy link
Contributor

sleeptightAnsiC commented Jan 18, 2025

The problem with implementing this is that dap.toggle_breakpoint() creates breakpoints "at the current line" in buffer taken from api.nvim_get_current_buf() . One cannot easily query it to set BP at specific line in file or function (not sure how well debuggers support the latter option). The workaround is probably possible by re-implementing this functionality on nvim-dap-ui side but it would be very ugly.

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

2 participants