Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f8135add
Unverified
Commit
f8135add
authored
Jul 13, 2020
by
Danny Tuppeny
Committed by
GitHub
Jul 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a flag for using WS for debug backend (#61359)
parent
da8695d3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
1 deletion
+26
-1
devfs_web.dart
packages/flutter_tools/lib/src/build_runner/devfs_web.dart
+6
-0
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+1
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+2
-0
device.dart
packages/flutter_tools/lib/src/device.dart
+3
-0
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+10
-1
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+4
-0
No files found.
packages/flutter_tools/lib/src/build_runner/devfs_web.dart
View file @
f8135add
...
...
@@ -42,6 +42,7 @@ typedef DwdsLauncher = Future<Dwds> Function({
bool
enableDebugExtension
,
String
hostname
,
bool
useSseForDebugProxy
,
bool
useSseForDebugBackend
,
bool
serveDevTools
,
void
Function
(
Level
,
String
)
logWriter
,
bool
verbose
,
...
...
@@ -142,6 +143,7 @@ class WebAssetServer implements AssetReader {
int
port
,
UrlTunneller
urlTunneller
,
bool
useSseForDebugProxy
,
bool
useSseForDebugBackend
,
BuildInfo
buildInfo
,
bool
enableDwds
,
Uri
entrypoint
,
...
...
@@ -235,6 +237,7 @@ class WebAssetServer implements AssetReader {
urlEncoder:
urlTunneller
,
enableDebugging:
true
,
useSseForDebugProxy:
useSseForDebugProxy
,
useSseForDebugBackend:
useSseForDebugBackend
,
serveDevTools:
false
,
logWriter:
(
Level
logLevel
,
String
message
)
=>
globals
.
printTrace
(
message
),
loadStrategy:
RequireStrategy
(
...
...
@@ -627,6 +630,7 @@ class WebDevFS implements DevFS {
@required
this
.
packagesFilePath
,
@required
this
.
urlTunneller
,
@required
this
.
useSseForDebugProxy
,
@required
this
.
useSseForDebugBackend
,
@required
this
.
buildInfo
,
@required
this
.
enableDwds
,
@required
this
.
entrypoint
,
...
...
@@ -641,6 +645,7 @@ class WebDevFS implements DevFS {
final
String
packagesFilePath
;
final
UrlTunneller
urlTunneller
;
final
bool
useSseForDebugProxy
;
final
bool
useSseForDebugBackend
;
final
BuildInfo
buildInfo
;
final
bool
enableDwds
;
final
bool
testMode
;
...
...
@@ -708,6 +713,7 @@ class WebDevFS implements DevFS {
port
,
urlTunneller
,
useSseForDebugProxy
,
useSseForDebugBackend
,
buildInfo
,
enableDwds
,
entrypoint
,
...
...
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
f8135add
...
...
@@ -448,6 +448,7 @@ class _ResidentWebRunner extends ResidentWebRunner {
packagesFilePath:
packagesFilePath
,
urlTunneller:
urlTunneller
,
useSseForDebugProxy:
debuggingOptions
.
webUseSseForDebugProxy
,
useSseForDebugBackend:
debuggingOptions
.
webUseSseForDebugBackend
,
buildInfo:
debuggingOptions
.
buildInfo
,
enableDwds:
_enableDwds
,
entrypoint:
globals
.
fs
.
file
(
target
).
uri
,
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
f8135add
...
...
@@ -374,6 +374,7 @@ class RunCommand extends RunCommandBase {
hostname:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-hostname'
)
:
''
,
port:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-port'
)
:
''
,
webUseSseForDebugProxy:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-protocol'
)
==
'sse'
,
webUseSseForDebugBackend:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-backend-protocol'
)
==
'sse'
,
webEnableExposeUrl:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-allow-expose-url'
),
webRunHeadless:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-run-headless'
),
webBrowserDebugPort:
browserDebugPort
,
...
...
@@ -400,6 +401,7 @@ class RunCommand extends RunCommandBase {
hostname:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-hostname'
)
:
''
,
port:
featureFlags
.
isWebEnabled
?
stringArg
(
'web-port'
)
:
''
,
webUseSseForDebugProxy:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-protocol'
)
==
'sse'
,
webUseSseForDebugBackend:
featureFlags
.
isWebEnabled
&&
stringArg
(
'web-server-debug-backend-protocol'
)
==
'sse'
,
webEnableExposeUrl:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-allow-expose-url'
),
webRunHeadless:
featureFlags
.
isWebEnabled
&&
boolArg
(
'web-run-headless'
),
webBrowserDebugPort:
browserDebugPort
,
...
...
packages/flutter_tools/lib/src/device.dart
View file @
f8135add
...
...
@@ -738,6 +738,7 @@ class DebuggingOptions {
this
.
port
,
this
.
webEnableExposeUrl
,
this
.
webUseSseForDebugProxy
=
true
,
this
.
webUseSseForDebugBackend
=
true
,
this
.
webRunHeadless
=
false
,
this
.
webBrowserDebugPort
,
this
.
webEnableExpressionEvaluation
=
false
,
...
...
@@ -751,6 +752,7 @@ class DebuggingOptions {
this
.
hostname
,
this
.
webEnableExposeUrl
,
this
.
webUseSseForDebugProxy
=
true
,
this
.
webUseSseForDebugBackend
=
true
,
this
.
webRunHeadless
=
false
,
this
.
webBrowserDebugPort
,
this
.
cacheSkSL
=
false
,
...
...
@@ -797,6 +799,7 @@ class DebuggingOptions {
final
String
hostname
;
final
bool
webEnableExposeUrl
;
final
bool
webUseSseForDebugProxy
;
final
bool
webUseSseForDebugBackend
;
/// Whether to run the browser in headless mode.
///
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
f8135add
...
...
@@ -184,11 +184,20 @@ abstract class FlutterCommand extends Command<void> {
allowed:
<
String
>[
'sse'
,
'ws'
],
defaultsTo:
'sse'
,
help:
'The protocol (SSE or WebSockets) to use for the debug service proxy '
'when using the Web Server device and Dart Debug
ger
extension. '
'when using the Web Server device and Dart Debug extension. '
'This is useful for editors/debug adapters that do not support debugging '
'over SSE (the default protocol for Web Server/Dart Debugger extension).'
,
hide:
hide
,
);
argParser
.
addOption
(
'web-server-debug-backend-protocol'
,
allowed:
<
String
>[
'sse'
,
'ws'
],
defaultsTo:
'sse'
,
help:
'The protocol (SSE or WebSockets) to use for the Dart Debug Extension '
'backend service when using the Web Server device. '
'Using WebSockets can improve performance but may fail when connecting through '
'some proxy servers.'
,
hide:
hide
,
);
argParser
.
addFlag
(
'web-allow-expose-url'
,
defaultsTo:
false
,
help:
'Enables daemon-to-editor requests (app.exposeUrl) for exposing URLs '
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
f8135add
...
...
@@ -461,6 +461,7 @@ void main() {
packagesFilePath:
'.packages'
,
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
''
,
...
...
@@ -572,6 +573,7 @@ void main() {
packagesFilePath:
'.packages'
,
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
''
,
...
...
@@ -680,6 +682,7 @@ void main() {
packagesFilePath:
'.packages'
,
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
buildInfo:
BuildInfo
.
debug
,
enableDwds:
false
,
entrypoint:
Uri
.
base
,
...
...
@@ -721,6 +724,7 @@ void main() {
packagesFilePath:
'.packages'
,
urlTunneller:
null
,
useSseForDebugProxy:
true
,
useSseForDebugBackend:
true
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
''
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment