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
705811fe
Unverified
Commit
705811fe
authored
Jan 07, 2021
by
Gary Roumanis
Committed by
GitHub
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix launching DevTools with Flutter Web applications (#72110)
parent
918100f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
resident_web_runner.dart
...s/flutter_tools/lib/src/isolated/resident_web_runner.dart
+11
-0
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+7
-3
No files found.
packages/flutter_tools/lib/src/isolated/resident_web_runner.dart
View file @
705811fe
...
...
@@ -808,6 +808,11 @@ class _ResidentWebRunner extends ResidentWebRunner {
});
websocketUri
=
Uri
.
parse
(
_connectionResult
.
debugConnection
.
uri
);
device
.
vmService
=
_vmService
;
// Update caches to enable the FlutterVmService extensions.
setHttpAddress
(
_httpUriFromWebsocketUri
(
websocketUri
),
device
.
vmService
);
setWsAddress
(
websocketUri
,
device
.
vmService
);
// Always run main after connecting because start paused doesn't work yet.
if
(!
debuggingOptions
.
startPaused
||
!
supportsServiceProtocol
)
{
_connectionResult
.
appConnection
.
runMain
();
...
...
@@ -859,4 +864,10 @@ class _ResidentWebRunner extends ResidentWebRunner {
await
device
.
exitApps
();
appFinished
();
}
Uri
_httpUriFromWebsocketUri
(
Uri
websocketUri
)
{
const
String
wsPath
=
'/ws'
;
final
String
path
=
websocketUri
.
path
;
return
websocketUri
.
replace
(
scheme:
'http'
,
path:
path
.
substring
(
0
,
path
.
length
-
wsPath
.
length
));
}
}
packages/flutter_tools/lib/src/vmservice.dart
View file @
705811fe
...
...
@@ -3,7 +3,7 @@
// found in the LICENSE file.
import
'package:file/file.dart'
;
import
'package:meta/meta.dart'
show
required
,
visibleForTesting
;
import
'package:meta/meta.dart'
show
required
;
import
'package:vm_service/vm_service.dart'
as
vm_service
;
import
'base/context.dart'
;
...
...
@@ -152,13 +152,17 @@ final Expando<Uri> _httpAddressExpando = Expando<Uri>();
final
Expando
<
Uri
>
_wsAddressExpando
=
Expando
<
Uri
>();
@visibleForTesting
void
setHttpAddress
(
Uri
uri
,
vm_service
.
VmService
vmService
)
{
if
(
vmService
==
null
)
{
return
;
}
_httpAddressExpando
[
vmService
]
=
uri
;
}
@visibleForTesting
void
setWsAddress
(
Uri
uri
,
vm_service
.
VmService
vmService
)
{
if
(
vmService
==
null
)
{
return
;
}
_wsAddressExpando
[
vmService
]
=
uri
;
}
...
...
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