-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"Stop on uncaught exceptions" sometimes stops on caught exceptions #55664
Comments
We would need a reproduction of the behavior you are seeing or at least more code pasted as text with clear description of what is happening. (e.g. here is the code in each frame on the stack, here is where exception is thrown, here is where debugger has stopped, etc). |
FWIW I can also see that exception is reported to the console as unhandled. So if that's the same exception the debugger stops for then debugger is correct. |
I spent considerable time trying to debug this, but couldn't follow the logic in this callback-based code. There are all sorts of weird (primitive Dart) conventions like capturing a stacktrace anywhere you think you may asynchronously throw an error in future, and then passing it into the async call... I'll close this since I couldn't figure it out! |
If I have "[Stop on] Uncaught exceptions" checked in VS Code, sometimes the debugger will stop when an exception is obviously caught, if there is an async gap between the try-catch and where the exception is thrown:
Example:
await client.openStreamingConnection
is clearly within atry
-catch
block, yet the runtime reports that the exception is unhandled, and the debugger stops on the exception as uncaught.Workspace Environment
Output from 'dart info'
/opt/flutter/bin/cache/dart-sdk/bin/dart info
If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.
General info
Project info
Process info
Output from 'flutter doctor'
/opt/flutter/bin/flutter doctor -v
The text was updated successfully, but these errors were encountered: