You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there an option to not pause on uncaught exceptions? #3897
Hey! Dart-code is awesome, and I've been using it for a while. One problem I have though is that it always pauses on uncaught exceptions. I'm using dart-code with nvim-dap, and I was wondering if there's a configuration option to not pause on uncaught exceptions.
Looking at the full list of configurations here it doesn't list an option, but in #2063 there's a button that can toggle pausing on uncaught exceptions so help finding this as a configuration would be appreciated! Thanks!
You should be able to control this at the bottom of the Debug panel. You might not see this panel until after you start a debug session though, as VS Code needs to talk to the debugger to find out what the options are.
Sorry, I totally scanned over that in your message 😄
These options are sent from the debug adapter to the client in its capabilities (the exceptionBreakpointFilters field). Your debug adapter client (nvim-dap) will need to process them and give you some option to set them (it should then call setExceptionBreakpoints with your selection).
Unfortunately I'm not a user of that plugin so I can't provide any guidance on setting this up (if it's supported), but if you file an issue with them about this, feel free to CC me if my input might be useful. Thanks!
Ok awesome thanks for the hint! I'll play around with that and see if I can figure out where to put the config. If I figure it out (or give up 😅) I'll respond with the solution and close the issue!
If you can't figure it out, it's probably worth posting a question in their issue tracker. If it's not something already supported, it seems like something worth adding support for.
I don't think there's anything to do here, so closing this - but feel free to ping me (here, or in other issues) if I can help.
By the way, if you're using the debug adapters from Dart-Code, you might want to check out the new SDK-shipped DAPs:
They're not entirely complete in the current stable versions of Dart/Flutter, but the next stable releases they should be reasonable complete. Using this will avoid having to check out/build the Dart-Code sources, and will be better supported going forwards (Dart-Code will migrate to them soon).
Activity
DanTup commentedon Mar 31, 2022
You should be able to control this at the bottom of the Debug panel. You might not see this panel until after you start a debug session though, as VS Code needs to talk to the debugger to find out what the options are.
Let me know if this doesn't work for you!
joshpetit commentedon Mar 31, 2022
I'm not using vscode 😅. I'm using nvim-dap.
Is there a configuration for it in the launch.json?
DanTup commentedon Mar 31, 2022
Sorry, I totally scanned over that in your message 😄
These options are sent from the debug adapter to the client in its capabilities (the
exceptionBreakpointFiltersfield). Your debug adapter client (nvim-dap) will need to process them and give you some option to set them (it should then callsetExceptionBreakpointswith your selection).Unfortunately I'm not a user of that plugin so I can't provide any guidance on setting this up (if it's supported), but if you file an issue with them about this, feel free to CC me if my input might be useful. Thanks!
joshpetit commentedon Mar 31, 2022
Ok awesome thanks for the hint! I'll play around with that and see if I can figure out where to put the config. If I figure it out (or give up 😅) I'll respond with the solution and close the issue!
DanTup commentedon Apr 5, 2022
If you can't figure it out, it's probably worth posting a question in their issue tracker. If it's not something already supported, it seems like something worth adding support for.
I don't think there's anything to do here, so closing this - but feel free to ping me (here, or in other issues) if I can help.
By the way, if you're using the debug adapters from Dart-Code, you might want to check out the new SDK-shipped DAPs:
https://github.com/dart-lang/sdk/blob/main/pkg/dds/tool/dap/README.md
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/debug_adapters/README.md
They're not entirely complete in the current stable versions of Dart/Flutter, but the next stable releases they should be reasonable complete. Using this will avoid having to check out/build the Dart-Code sources, and will be better supported going forwards (Dart-Code will migrate to them soon).
joshpetit commentedon Mar 21, 2023
This is how to stop pausing on uncaught exceptions in nvim dap: https://github.com/mfussenegger/nvim-dap/blob/9915c3a94e04b872ce6310f28fb33d0b5f41a292/doc/dap.txt#L705
Just clear the minibuffer when prompted.
lucaSartore commentedon Sep 23, 2024
I admit this is a bit of shameless self promotion, however I made a plugin that allow to use that feature in nvim more easily, you can find it here: https://github.com/lucaSartore/nvim-dap-exception-breakpoints