flutter / flutter/devtools

[Feature] Passive exception capture mode in the Debugger tab

未关闭
#9,854 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement P2 screen: debugger
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

## Problem

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

贡献指南

打开贡献指南

调研方向

从“Debugger”标签页的异常模式选择器开始,跟踪它如何处理 VM Service Debug 事件流事件以及恢复行为。检查“Logging”标签页和 DevTools 本地服务器进程,了解现有的输出路径。完成标准是:仅限 Debug Mode 的“Log exceptions”选项能够将包含 route、timestamp 和 count 的去重异常详细信息记录到指定的 .devtools Markdown 文件中。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart
领域
devtools
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。