Stream logging from attached debugger on iOS #66390
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reland #66092. See #66364 (comment) for details.
Description
As of iOS 13, the host can't directly read the device logs from the host. #43915 connected to the VM observatory and read the log lines from the logging services.
On
flutter runandflutter drive(notattachin this PR), instead of waiting to attach to the observatory, instead launch the app with the debugger and stay attached to stream in the logs fromlldb. See #54781 (comment) for details. This should also reduce devicelab flakes.This will give the tool access to:
print()stderr.writeln, other I/O sinksos_log,assertsetc)Notes
flutter attach. A follow up PR could attach the debugger in that scenario as well (without re-launching), and then the VM connection can be removed.idevicesyslog.Related Issues
Fixes #44717
Fixes #44718
Fixes #54781
#39240 (fixes
run/drive, notattach)#58078 (fixes
run/drive, notattach)Mitigate #46705 (
run/drive, notattach)Will allow us to turn off mDNS fallback for
driveon CI to solve iOS 14 issue #65207Note to self: check if this fixes #19196
Tests
Follow up with logging integration tests so this stops regressing.
Also, manually tested:
ios-deployprocesses aren't leakingChecklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change