Skip to content

Is there an option to not pause on uncaught exceptions? #3897

Closed

Description

@joshpetit

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!

Activity

  1. DanTup commented on Mar 31, 2022

    @DanTup
    Member

    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.

    Screenshot 2022-03-31 at 15 50 41

    Let me know if this doesn't work for you!

  2. joshpetit commented on Mar 31, 2022

    @joshpetit
    Author

    I'm not using vscode 😅. I'm using nvim-dap.

    Is there a configuration for it in the launch.json?

  3. DanTup commented on Mar 31, 2022

    @DanTup
    Member

    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!

  4. joshpetit commented on Mar 31, 2022

    @joshpetit
    Author

    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!

  5. DanTup commented on Apr 5, 2022

    @DanTup
    Member

    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).

  6. joshpetit commented on Mar 21, 2023

    @joshpetit
    Author

    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.

  7. lucaSartore commented on Sep 23, 2024

    @lucaSartore

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting infoRequires more information from the customer to progressis question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions