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
8387c238
Unverified
Commit
8387c238
authored
Feb 02, 2023
by
Danny Tuppeny
Committed by
GitHub
Feb 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Use base DAP detach and ensure correct output (#119076)
parent
22bbdf03
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
flutter_adapter.dart
...flutter_tools/lib/src/debug_adapters/flutter_adapter.dart
+1
-1
flutter_base_adapter.dart
...er_tools/lib/src/debug_adapters/flutter_base_adapter.dart
+1
-1
flutter_adapter_test.dart
...integration.shard/debug_adapter/flutter_adapter_test.dart
+11
-4
No files found.
packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart
View file @
8387c238
...
...
@@ -354,7 +354,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter {
@override
Future
<
void
>
terminateImpl
()
async
{
if
(
isAttach
)
{
await
preventBreakingAndResume
();
await
handleDetach
();
}
// Send a request to stop/detach to give Flutter chance to do some cleanup.
...
...
packages/flutter_tools/lib/src/debug_adapters/flutter_base_adapter.dart
View file @
8387c238
...
...
@@ -122,7 +122,7 @@ abstract class FlutterBaseDebugAdapter extends DartDebugAdapter<FlutterLaunchReq
@override
Future
<
void
>
disconnectImpl
()
async
{
if
(
isAttach
)
{
await
preventBreakingAndResume
();
await
handleDetach
();
}
terminatePids
(
ProcessSignal
.
sigkill
);
}
...
...
packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart
View file @
8387c238
...
...
@@ -561,11 +561,18 @@ void main() {
dap
.
client
.
setBreakpoint
(
breakpointFilePath
,
breakpointLine
),
],
eagerError:
true
);
// Detach.
await
dap
.
client
.
terminate
();
// Detach and expected resume and correct output.
await
Future
.
wait
(<
Future
<
void
>>[
// We should print "Detached" instead of "Exited".
dap
.
client
.
outputEvents
.
firstWhere
((
OutputEventBody
event
)
=>
event
.
output
.
contains
(
'
\n
Detached'
)),
// We should still get terminatedEvent (this signals the DAP server terminating).
dap
.
client
.
event
(
'terminated'
),
// We should get output showing the app resumed.
testProcess
.
output
.
firstWhere
((
String
output
)
=>
output
.
contains
(
'topLevelFunction'
)),
// Trigger the detach.
dap
.
client
.
terminate
(),
]);
// Ensure we get additional output (confirming the process resumed).
await
testProcess
.
output
.
first
;
});
});
}
...
...
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