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
ca789bf5
Unverified
Commit
ca789bf5
authored
Jun 04, 2021
by
Jonah Williams
Committed by
GitHub
Jun 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] bail from printing if devtools launch fails (#83934)
parent
c6359dc9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
resident_devtools_handler.dart
...ages/flutter_tools/lib/src/resident_devtools_handler.dart
+4
-0
resident_devtools_handler_test.dart
...ls/test/general.shard/resident_devtools_handler_test.dart
+16
-0
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+0
-1
No files found.
packages/flutter_tools/lib/src/resident_devtools_handler.dart
View file @
ca789bf5
...
...
@@ -82,6 +82,10 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
_served
=
true
;
}
await
_devToolsLauncher
.
ready
;
// Do not attempt to print debugger list if the connection has failed.
if
(
_devToolsLauncher
.
activeDevToolsServer
==
null
)
{
return
;
}
final
List
<
FlutterDevice
>
devicesWithExtension
=
await
_devicesWithExtensions
(
flutterDevices
);
await
_maybeCallDevToolsUriServiceExtension
(
devicesWithExtension
);
await
_callConnectedVmServiceUriExtension
(
devicesWithExtension
);
...
...
packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
View file @
ca789bf5
...
...
@@ -192,6 +192,22 @@ void main() {
);
});
testWithoutContext
(
'serveAndAnnounceDevTools will bail if launching devtools fails'
,
()
async
{
final
ResidentDevtoolsHandler
handler
=
FlutterResidentDevtoolsHandler
(
FakeDevtoolsLauncher
()..
activeDevToolsServer
=
null
,
FakeResidentRunner
(),
BufferLogger
.
test
(),
);
final
FakeVmServiceHost
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[],
httpAddress:
Uri
.
parse
(
'http://localhost:1234'
));
final
FakeFlutterDevice
device
=
FakeFlutterDevice
()
..
vmService
=
fakeVmServiceHost
.
vmService
;
await
handler
.
serveAndAnnounceDevTools
(
flutterDevices:
<
FlutterDevice
>[
device
],
);
});
testWithoutContext
(
'serveAndAnnounceDevTools with web device'
,
()
async
{
final
ResidentDevtoolsHandler
handler
=
FlutterResidentDevtoolsHandler
(
FakeDevtoolsLauncher
()..
activeDevToolsServer
=
DevToolsServerAddress
(
'localhost'
,
8080
),
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
ca789bf5
...
...
@@ -1926,7 +1926,6 @@ void main() {
FileSystem:
()
=>
ThrowingForwardingFileSystem
(
MemoryFileSystem
.
test
()),
}));
testUsingContext
(
'ColdRunner writes vm service file when providing debugging option'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
listViews
,
...
...
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