1.Waiting for observatory port to be available 待解決
大概找到問(wèn)題所在:https://github.com/flutter/flutter/issues/18409
由于我的機(jī)器是沒(méi)有管理員權(quán)限導(dǎo)致:/usr/bin/log stream無(wú)法正常執(zhí)行
由于沒(méi)管理員權(quán)限,暫時(shí)沒(méi)法驗(yàn)證方案。
嘗試了一下iOS11以下的模擬器是可以正常debug的皿伺。
/// Launches the device log reader process on the host.
Future<Process> launchDeviceLogTool(IOSSimulator device) async {
// Versions of iOS prior to iOS 11 log to the simulator syslog file.
if (await device.sdkMajorVersion < 11)
return runCommand(<String>['tail', '-n', '0', '-F', device.logFilePath]);
// For iOS 11 and above, use /usr/bin/log to tail process logs.
// Run in interactive mode (via script), otherwise /usr/bin/log buffers in 4k chunks. (radar: 34420207)
return runCommand(<String>[
'script', '/dev/null', '/usr/bin/log', 'stream', '--style', 'syslog', '--predicate', 'processImagePath CONTAINS "${device.id}"',
]);
}