1.Waiting for observatory port to be available 待解决
大概找到问题所在:https://github.com/flutter/flutter/issues/18409
由于我的机器是没有管理员权限导致:/usr/bin/log stream无法正常执行
由于没管理员权限,暂时没法验证方案。
尝试了一下iOS11以下的模拟器是可以正常debug的。
/// Launches the device log reader process on the host.
Future launchDeviceLogTool(IOSSimulator device) async {
// Versions of iOS prior to iOS 11 log to the simulator syslog file.
if (await device.sdkMajorVersion < 11)
return runCommand(['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([
'script', '/dev/null', '/usr/bin/log', 'stream', '--style', 'syslog', '--predicate', 'processImagePath CONTAINS "${device.id}"',
]);
}