-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add UI and API for ease of control over breakpoints #448
Comments
I'd kinda like that, but afaik it's currently not possible to have quickfix context specific mappings. It would probably need a dedicated widget and I currently don't plan to add that, unless adding support for data breakpoints or dependant breakpoints will make it necessary. This might be something that fits more into https://github.com/rcarriga/nvim-dap-ui than the nvim-dap core. |
While browsing nvim-dap sources to try to make use of theHamsta/nvim-dap-virtual-text#50 I found what require'dap.breakpoints'.remove(vim.api.nvim_buf_get_number(0), 22)
require 'dap'.session():set_breakpoints(require'dap.breakpoints'.get(vim.api.nvim_buf_get_number(0))) is enough to remove breakpoint from the current buffer on line 22. If it's correct, what do you think about adding explicit method to remove breakpoint by filename/bufnr and line? |
Just wanted to pitch in - I would love to extend the existing set_breakpoint API to take a custom filename and line number. This would be extremely useful in C++ projects if you want to set a breakpoint in external code. Perhaps we could combine setting and removing breakpoints by filename string? Note that I don't think adding UI elements belongs in this project - I would only like to make the API a bit more flexible. @mfussenegger Thoughts? |
See #1388 |
Problem Statement
Currently the have two ways to centralized control all breakpoints: by running
dap.clear_breakpoints()
ordap.list_breakpoints()
. The later allows for overview and jumping to the selected breakpoint.Sometimes I would like to, for example, remove all except two breakpoints. It would be good to can remove some subset created by some selection or some API call (to utilize on dap-ui-like interfaces).
Ideas or possible solutions
From the UI point of view: mapping
dd
(or anything configurable) on a single quickfix item to remove breakpoint would be a significant step ahead.The text was updated successfully, but these errors were encountered: