Skip to content

[flutter_tools] [DAP] Extract and forward DevTools Deep Link URLs to DAP clients - #190455

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
DanTup:forward-inspector-deep-links
Aug 5, 2026
Merged

auto-submit[bot] merged 4 commits into
flutter:masterfrom
DanTup:forward-inspector-deep-links

Conversation

@DanTup

@DanTup DanTup commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This is functionality from the legacy DAPs that was missed when migrating to the SDK. Some kinds of errors (such as Overflow errors) includes nodes to deep-link into DevTools. By forwarding these to the IDE, instead of just a text link the IDE can show a toast notification with a button to open the embedded version of DevTools.

This is part of the work to fix Dart-Code/Dart-Code#6134. There are some additional fixes required elsewhere, but once those are resolved, this will result in a notification like this:

image

Clicked "Inspect Widget" will open the embedded Inspector on the correct widget.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

…ients

This is functionality from the legacy DAPs that was missed when migrating to the SDK. Some kinds of errors (such as Overflow errors) includes nodes to deep-link into DevTools. By forwarding these to the IDE, instead of just a text link the IDE can show a toast notification with a button to open the embedded version of DevTools.

This is part of the work to fix Dart-Code/Dart-Code#6134.
@DanTup
DanTup requested a review from bkonyi August 3, 2026 17:08
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 3, 2026
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 3, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates FlutterErrorFormatter to extract the error summary and DevTools deep link URL from structured errors, and modifies FlutterDebugAdapter to forward these deep links via a dart.flutter.devToolsDeepLink event. The review feedback suggests using null-coalescing assignment (??=) to prevent nested nodes from overwriting the primary error summary and deep link URL, and requests adding a test to verify that FlutterDebugAdapter correctly forwards the event.

Comment thread packages/flutter_tools/lib/src/debug_adapters/error_formatter.dart
Comment thread packages/flutter_tools/lib/src/debug_adapters/error_formatter.dart

@bkonyi bkonyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall! Just one nit.

Comment thread packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart Outdated
@DanTup
DanTup requested a review from bkonyi August 5, 2026 15:07

@bkonyi bkonyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 5, 2026
Merged via the queue into flutter:master with commit 8ebfb2e Aug 5, 2026
22 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
@DanTup
DanTup deleted the forward-inspector-deep-links branch August 6, 2026 11:22
DanTup added a commit to Dart-Code/Dart-Code that referenced this pull request Aug 6, 2026
This is work towards #6134. It also requires a Flutter change (flutter/flutter#190455) and to track down why the DevTools server URL + VM Service URL in the Flutter code are `null` (which prevents the error not being included).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deep-links into DevTools on Overflow errors no longer appear

2 participants