Skip to content

Commit cfd5a6b

Browse files
authored
Indicate whether an app is a Flutter app via the app ID (#2406)
1 parent 7d0d2d4 commit cfd5a6b

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

dwds/debug_extension_mv3/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mv3_extension
22
publish_to: none
3-
version: 2.1.2
3+
version: 2.1.3
44
homepage: https://github.com/dart-lang/webdev
55
description: >-
66
A Chrome extension for Dart debugging.

dwds/debug_extension_mv3/web/cider_connection.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ Future<void> _sendInspectorUrl({String? appId}) async {
205205
}
206206

207207
int _tabId(String appId) {
208+
// The suffix "-f" is used to tell Cider that this is a Flutter app.
209+
if (appId.endsWith('-f')) {
210+
appId = appId.substring(0, appId.length - 2);
211+
}
208212
final tabId = appId.split('-').last;
209213
return int.parse(tabId);
210214
}

dwds/debug_extension_mv3/web/manifest_mv3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Dart Debug Extension",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"manifest_version": 3,
55
"devtools_page": "static_assets/devtools.html",
66
"action": {

dwds/debug_extension_mv3/web/popup.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ Future<bool> _insertAppId() async {
9090
final debugInfo = await _fetchDebugInfo(tabId);
9191
if (debugInfo == null) return false;
9292
final isInternalBuild = debugInfo.isInternalBuild ?? false;
93+
final isFlutterApp = debugInfo.isFlutterApp ?? false;
9394
final workspaceName = debugInfo.workspaceName;
9495
if (isInternalBuild && workspaceName != null) {
95-
_appId = '$workspaceName-$tabId';
96+
// The suffix "-f" is used to tell Cider that this is a Flutter app.
97+
_appId = '$workspaceName-$tabId${isFlutterApp ? '-f' : ''}';
9698
final appIdSpan = document.getElementById(_appIdSpanId) as SpanElement;
9799
appIdSpan.setInnerHtml(_appId);
98100
return true;

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ ${globalToolConfiguration.loadStrategy.loadModuleSnippet}("dart_sdk").developer.
515515
throw RPCError(
516516
method,
517517
decodedResponse['code'] as int,
518+
// ignore: avoid-unnecessary-type-casts
518519
decodedResponse['message'] as String,
519520
decodedResponse['data'] as Map,
520521
);

0 commit comments

Comments
 (0)