-
-
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
set a breakpoint automatically on launch? #1456
Comments
I'm not sure I follow. You can call And depending on the debug adapter you can configure the exception breakpoints so that it automatically stops when it encounters an exception. You can configure these e.g. like: require('dap').defaults.fallback.exception_breakpoints = {'raised'} See |
oh! you're absolutely right, i could hook this when nvim loads the workspace, it doesn't have to be after the session has started. thanks :)
that doesn't work for this codebase because it doesn't use unwinding/c++ exceptions. |
wait hold on, i don't understand - that says "Creates or removes a breakpoint at the current line." i guess that means "at the current cursor"? is there a way to set a breakpoint that's not tied to the cursor? |
There will be with #1388 In the meantime you can either temporarly change the cursor ( nvim-dap/lua/dap/breakpoints.lua Line 107 in 12b846b
|
for posterity: i found a way to do this, it's |
Problem Statement
i have a codebase with an
assert()
macro. i want to break on any line where an assertion fails, across any run of this program, without having to set a breakpoint manually each time i open vim.Possible Solutions
my first thought was to add some kind of hook to
dap.configurations.cpp
. but i don't see any hook that looks relevant?dap.listeners.on_config
is not what i want because it runs before the process attaches, not after.Considered Alternatives
manually create the breakpoint each time i open vim. this is tedious and feels like it shouldn't be necessary.
The text was updated successfully, but these errors were encountered: