-
Notifications
You must be signed in to change notification settings - Fork 86
Support running DWDS without a Chrome Debug Port (web-socket-based) #2639
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
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
1fe0895
implemented socket-based dwds
jyameo 2707a41
fix issue with run main at start
jyameo 489dbcc
updated changelog
jyameo a4e0dd0
simulate debugExtension in websocket-based execution flow
jyameo 412bda3
added multiwindow support
jyameo 8f7c645
refactoring and removing unused method
jyameo 91c7b41
support page refresh from vsCode
jyameo 871f388
refactor createisolate and resume method
jyameo d7dad51
implemented pause/resume logic
jyameo 6f40567
improve canReuseConnection logic
jyameo b4d5cb1
comments cleanup
jyameo 0edf3d8
fixed canReuseConnection logic
jyameo 340baad
implemented _handleConnectionClosed and fix issue with getVM
jyameo fa5feb0
fix issue with handling isolate cleanup
jyameo 6ba7f5b
afe9fc9
addressed comments regarding closing remoteDebugger
jyameo 18617bd
code cleanup
jyameo 32f165e
created common interface for debugService and webSocketDebugService
jyameo 49b234a
remove use of _acceptNewConnections in WebSocketDebugService
jyameo af9763f
created proxy_service.dart and consolidated all duplicated code
jyameo a61bde1
consolidate webSocketAppDebugService and AppDebugServices
jyameo 813765e
consolidate dwdsVmClient and WebSocketDwdsVmClient
jyameo 14e2a2a
refactored can remove duplicate methods
jyameo dea7f56
remove use of dynamic
jyameo 5340ab0
fix dev_handler error
jyameo be31caa
consolidate handleChromeMessages and handleWebSocketMessages created …
jyameo cf526af
updated logg message in _sendRequestToClients
jyameo 4937508
updated dev_handler to throw error if proxy_service is not the right …
jyameo 8bce65a
Merge branch 'main' into websocketproxyservice
jyameo 3d0d4ea
addressing analyzer issues
jyameo 3e919ce
removed unused variable
jyameo cd5b810
updated port to 44456
jyameo 1c55263
refactored classes to and interface names to be more clear
jyameo 956c323
fix variable name error
jyameo fb5057b
updated variable to be type
jyameo 92b0f19
Merge branch 'main' into websocketproxyservice
jyameo a3e09a6
prepare version 24.4.1 for release
jyameo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2025, the Dart project authors. All rights reserved. | ||
// Defines the request for service extension calls over WebSocket. | ||
|
||
import 'dart:convert'; | ||
import 'package:built_value/built_value.dart'; | ||
import 'package:built_value/serializer.dart'; | ||
|
||
part 'service_extension_request.g.dart'; | ||
|
||
abstract class ServiceExtensionRequest | ||
implements Built<ServiceExtensionRequest, ServiceExtensionRequestBuilder> { | ||
String get id; | ||
String get method; | ||
String | ||
get argsJson; // Store args as JSON string for built_value compatibility | ||
|
||
// Helper method to get args as Map<String, dynamic> | ||
Map<String, dynamic> get args => | ||
argsJson.isEmpty | ||
? <String, dynamic>{} | ||
: json.decode(argsJson) as Map<String, dynamic>; | ||
|
||
ServiceExtensionRequest._(); | ||
factory ServiceExtensionRequest([ | ||
void Function(ServiceExtensionRequestBuilder) updates, | ||
]) = _$ServiceExtensionRequest; | ||
|
||
// Convenient factory method to create with args Map | ||
factory ServiceExtensionRequest.fromArgs({ | ||
required String id, | ||
required String method, | ||
required Map<String, dynamic> args, | ||
}) => ServiceExtensionRequest( | ||
(b) => | ||
b | ||
..id = id | ||
..method = method | ||
..argsJson = json.encode(args), | ||
); | ||
|
||
static Serializer<ServiceExtensionRequest> get serializer => | ||
_$serviceExtensionRequestSerializer; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up (in a different change) should we update the ChromeProxyService to also use this Built object for service extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ChromeProxyService leverages the inspector to evaluate JavaScript expressions via
invokeExtensionJsExpression
(as seen in the_callServiceExtension
method). This pattern is consistently used throughout ChromeProxyService for all interactions with the dartDevEmbedder. It evaluates JavaScript expressions directly in the browser context rather than sending structured messages. Since ChromeProxyService operates by executing JavaScript in the browser, using a Built object here wouldn't align with ChromeProxyService's JavaScript evaluation approach. The current pattern maintains consistency with how ChromeProxyService handles all other browser interactions.