Skip to content

Support embedded debugging experience in environments with nested Dart app ID #1525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dwds/debug_extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.26

- Support embedded debugging experience in environments with no Dart app ID.

## 1.25

- Embed Dart DevTools in Chrome DevTools.
Expand Down
2 changes: 1 addition & 1 deletion dwds/debug_extension/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: extension
publish_to: none
version: 1.25.0
version: 1.26.0
author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/webdev
description: >-
Expand Down
22 changes: 11 additions & 11 deletions dwds/debug_extension/web/background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,21 +225,21 @@ void _handleMessageFromContentScripts(
_maybeMarkTabAsDebuggable(request, sender, sendResponse);
break;
case 'panel-script':
_handleDevToolsOpen(request, sender);
_handleMessageFromPanelScript(request, sender);
break;
}
}

void _handleDevToolsOpen(Request request, Sender sender) {
if (request.message == 'devtools-open') {
_updateOrCreateDevToolsPanel(request.dartAppId, (panel) {
panel.panelId = sender.id;
});
return;
}

if (request.message == 'start-debugging') {
_startDebugging(DebuggerTrigger.dartPanel);
void _handleMessageFromPanelScript(Request request, Sender sender) {
switch (request.message) {
case 'devtools-open':
_updateOrCreateDevToolsPanel(request.dartAppId, (panel) {
panel.panelId = sender.id;
});
break;
case 'start-debugging':
_startDebugging(DebuggerTrigger.dartPanel);
break;
}
}

Expand Down
Loading