feat(debugger): debug Flutter apps through the Flutter debug adapter (#1474)

Dart projects that depend on the Flutter SDK were debugged through
`dart debug_adapter`, which cannot start a program importing dart:ui and has no
hot reload. A session now uses `flutter debug_adapter` when the program's or the
working directory's pubspec.yaml depends on the Flutter SDK, or when an attach
configuration asks for it (add-to-app: vm-service-uri and device map to the
adapter's attach arguments). Hot Reload and Hot Restart are sent over DAP and
appear in the toolbar of Dart sessions. Dart files also get a debug configuration.

Co-authored-by: payailk <[email protected]>
Цей коміт міститься в:
payailk authored and GitHub committed 2026-11-05 14:14:47 +08:00
1 джерело 8869f1ce1c
коміт 566190e94b
16 files changed
+187 -2

No files matched your search

+8
Переглянути файл
@@ -32,6 +32,7 @@ import {
selectSession,
selectThread,
revealFrame,
rootOf,
sessionSupports,
useDebug,
type DebugSession,
@@ -200,6 +201,13 @@ export function DebugToolWindow() {
<ToolButton action="debug.stepInto" icon="step-into" />
<ToolButton action="debug.stepOut" icon="step-out" />
<span className={styles.sep} aria-hidden />
{rootOf(active).adapter === "dart" && (
<>
<ToolButton action="debug.hotReload" icon="hot-reload" />
<ToolButton action="debug.hotRestart" icon="refresh" />
<span className={styles.sep} aria-hidden />
</>
)}
<IconButton
icon="view-breakpoints"
action="debug.viewBreakpoints"