Skip to content

Commit a7c8fe7

Browse files
authored
Allow for setting custom DDS port (#2546)
Related to flutter/flutter#159157
1 parent 7dc5c3a commit a7c8fe7

18 files changed

+262
-105
lines changed

dwds/CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
## 24.4.0-wip
1+
## 24.3.1
2+
3+
- Add support for binding DDS to a custom port.
24

35
## 24.3.0
46

dwds/lib/dart_web_debug_service.dart

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class Dwds {
128128
debugSettings.expressionCompiler,
129129
injected,
130130
debugSettings.spawnDds,
131+
debugSettings.ddsPort,
131132
debugSettings.launchDevToolsInNewWindow,
132133
);
133134

dwds/lib/data/build_result.g.dart

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/connect_request.g.dart

+7-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/debug_event.g.dart

+11-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/debug_info.g.dart

+14-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/devtools_request.g.dart

+15-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/error_response.g.dart

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/extension_request.g.dart

+23-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/data/register_event.g.dart

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/lib/src/config/tool_configuration.dart

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class DebugSettings {
6161
final bool useSseForDebugBackend;
6262
final bool useSseForInjectedClient;
6363
final bool spawnDds;
64+
final int? ddsPort;
6465
final bool enableDevToolsLaunch;
6566
final bool launchDevToolsInNewWindow;
6667
final bool emitDebugEvents;
@@ -75,6 +76,7 @@ class DebugSettings {
7576
this.useSseForDebugBackend = true,
7677
this.useSseForInjectedClient = true,
7778
this.spawnDds = true,
79+
this.ddsPort,
7880
this.enableDevToolsLaunch = true,
7981
this.launchDevToolsInNewWindow = true,
8082
this.emitDebugEvents = true,

dwds/lib/src/handlers/dev_handler.dart

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class DevHandler {
6666
final bool _useSseForDebugProxy;
6767
final bool _useSseForInjectedClient;
6868
final bool _spawnDds;
69+
final int? _ddsPort;
6970
final bool _launchDevToolsInNewWindow;
7071
final ExpressionCompiler? _expressionCompiler;
7172
final DwdsInjector _injected;
@@ -90,6 +91,7 @@ class DevHandler {
9091
this._expressionCompiler,
9192
this._injected,
9293
this._spawnDds,
94+
this._ddsPort,
9395
this._launchDevToolsInNewWindow,
9496
) {
9597
_subs.add(buildResults.listen(_emitBuildResults));
@@ -215,6 +217,7 @@ class DevHandler {
215217
useSse: false,
216218
expressionCompiler: _expressionCompiler,
217219
spawnDds: _spawnDds,
220+
ddsPort: _ddsPort,
218221
);
219222
}
220223

@@ -645,6 +648,7 @@ class DevHandler {
645648
useSse: _useSseForDebugProxy,
646649
expressionCompiler: _expressionCompiler,
647650
spawnDds: _spawnDds,
651+
ddsPort: _ddsPort,
648652
);
649653
appServices = await _createAppDebugServices(
650654
debugService,

0 commit comments

Comments
 (0)