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
[Feature] Passive exception capture mode in the Debugger tab #9854
The Debugger's existing exception modes (Ignore, Uncaught, All) - all share the same behaviour: the VM pauses and waits for the developer to resume. This breaks down for intermittent bugs, timing-sensitive flows, and exceptions that are hard to reproduce on demand. There is currently no way to let the app run freely and collect exception data without altering the conditions that produced it.
The Logging tab surfaces FlutterError output but as a raw unstructured stream - no deduplication, no route context, no export. It is not designed for this workflow.
Proposed solution
Add a fourth option to the existing exception mode selector in the Debugger tab:
Ignore exceptions
Uncaught exceptions
All exceptions
Log exceptions <- new
When active, DevTools listens to the VM Service Debug event stream for exception events without sending a resume signal - the VM is already emitting these, this mode just doesn't pause on them. Captured exceptions are deduplicated by stack trace hash and written continuosly to Example - ".devtools/exception_log_<timestamp>.md" at project root via the DevTools local server process written to disk as exceptions are captured.
Each entry captures exception type, message, stack trace, current route, timestamp, and occurrence count for Debug Mode only.
The Debugger's existing exception modes (Ignore, Uncaught, All) - all share the same behaviour: the VM pauses and waits for the developer to resume.
It seems like the bug is that even when Ignore Exceptions is enabled, the app is still pausing. A secondary bug may be that the exception is not logged by default in a way that is useful. @bkonyi can you comment on the expected behavior from the VM side, and what is your take on two issues I am describing?
It seems like the bug is that even when Ignore Exceptions is enabled, the app is still pausing.
This definitely isn't WAI if that's what's happening. However, we should have tests for this so it'd be great if we could have a reproduction case to work with.
A secondary bug may be that the exception is not logged by default in a way that is useful.
In what context do we want to log these exceptions by default? In the context of Flutter, if we encounter an unhandled exception it's automatically logged, and in the standalone Dart VM, we print the stack trace and exit the isolate. If exceptions are handled, we obviously don't log anything by default.
If someone's interested in capturing and logging exceptions, including those that are handled, the Zone API does provide hooks to intercept handled and unhandled exceptions from asynchronous contexts.
Apologies for the delay. To clarify, Ignore mode not pausing is correct.
The gap I'm pointing at is between Ignore and Uncaught: Ignore is silent (nothing captured), Uncaught pauses. There's no mode that captures without pausing.
The proposal is a "Log" mode — no pause, like Ignore — but exceptions are surfaced in DevTools with structure (type, stack trace, route, timestamp) and exportable. Zero app-side instrumentation, unlike Zones.
Happy to write a design doc if this seems worth exploring.
Activity
keertip commentedon Jun 16, 2026
@kenzieschmoll , wdyt?
kenzieschmoll commentedon Jun 16, 2026
It seems like the bug is that even when Ignore Exceptions is enabled, the app is still pausing. A secondary bug may be that the exception is not logged by default in a way that is useful. @bkonyi can you comment on the expected behavior from the VM side, and what is your take on two issues I am describing?
bkonyi commentedon Jun 16, 2026
This definitely isn't WAI if that's what's happening. However, we should have tests for this so it'd be great if we could have a reproduction case to work with.
In what context do we want to log these exceptions by default? In the context of Flutter, if we encounter an unhandled exception it's automatically logged, and in the standalone Dart VM, we print the stack trace and exit the isolate. If exceptions are handled, we obviously don't log anything by default.
If someone's interested in capturing and logging exceptions, including those that are handled, the Zone API does provide hooks to intercept handled and unhandled exceptions from asynchronous contexts.
Sameer330 commentedon Jun 22, 2026
@keertip @kenzieschmoll @bkonyi
Apologies for the delay. To clarify, Ignore mode not pausing is correct.
The gap I'm pointing at is between Ignore and Uncaught: Ignore is silent (nothing captured), Uncaught pauses. There's no mode that captures without pausing.
The proposal is a "Log" mode — no pause, like Ignore — but exceptions are surfaced in DevTools with structure (type, stack trace, route, timestamp) and exportable. Zero app-side instrumentation, unlike Zones.
Happy to write a design doc if this seems worth exploring.