iOS如何实时查看App运行日志
Linux下管理挂载IOS设备——libimobiledevice
https://www.jianshu.com/p/6423610d3293
https://blog.csdn.net/fengzei886/article/details/53380009
#####gitlib下载包--编译安装
git clone https://github.com/libimobiledevice/libplist.git
git clone https://github.com/libimobiledevice/usbmuxd.git
git clone https://github.com/libimobiledevice/libusbmuxd.git
git clone https://github.com/libimobiledevice/ideviceinstaller.git
git clone https://github.com/libimobiledevice/ifuse.git
git clone https://github.com/libimobiledevice/libirecovery.git
git clone https://github.com/libimobiledevice/libideviceactivation.git
./configure
make && make install
##创建挂接目录
mkdir -p /media/iphone
ifuse /media/iphone
idevicepair pair
idevice_id --list
##实时查看日志
idevicesyslog|grep com.bxd.help
#####################################################
libimobiledevice 查看应用日志
iOS实时查看App运行日志
前言:
本文讨论如何实时查看输出在console控制台的日志。
一、Xcode
版本号:9.4.1
通过Window->Devices and Simulators,打开Devices and Simulators界面,选择我们的手机,点击view device logs能看到手机中运行的进程输出的日志。如图:


二、libimobiledevice
安装libimobiledevice很简单,在命令行输入:
brew install --HEAD libimobiledevice
注意,需要加上 –HEAD 选项,如果不加,安装是老版本,不支持iOS10的手机,所以安装时,需要加上 –HEAD 选项
1、使用idevicesyslog
在命令行输入:idevicesyslog
就可以在屏幕上看见手机上所有的日志了。

2、查看我们想要的日志
1)将设备日志重定向到文件
idevicesyslog >> iphone.log &
该命令是将日志导入到iphone.log这个文件,并且是在后台执行。
2)用tail -f和grep查看log
tail -f iphone.log
tail -f iphone.log | grep 'QQ' # 查看包含QQ的行
如下图:

三、控制台
在用过各种办法查看App日志后,还是觉得苹果系统自带的工具用起来最方便,不用安装,不用命令行,傻瓜式操作,非常方便。
连上手机,在LaunchPad其他文件中打开控制台应用,或者搜索Console.app打开控制台应用,可以看到左侧一栏中有我们的手机设备,选择就可以,如图:

右侧输出的日志不仅有我们自己的App还有其他进程的日志,怎么过滤?非常简单,选中一条我们的日志,在进程名字上右键,选择显示进程名,然后就只会显示我们App的日志。如果显示的列名中没有进程名,我们可以在其他列名上右键,在弹出的菜单中勾选上进程就可以了。如图显示WeChat打印出的日志:



四、安装第三方工具 itoos for mac /windows/linux


iPhone安装OpenSSH和远程连接教程
Building on Ubuntu 16.04
Install development packages discovered through trial and error.
sudo apt-get install automake libtool pkg-config libplist-dev libplist++-dev python-dev libssl-dev libusb-1.0-0-dev libfuse-dev
Clone and Build
Clone the sources.
cd ~/usr/src
for x in libusbmuxd usbmuxd libimobiledevice ifuse; do git clone https://github.com/libimobiledevice/${x}.git;done
Now build in order (the order matters):
- libplist (not required on Ubuntu 16.04)
- libusbmuxd
- libimobiledevice
- usbmuxd
- ifuse
Note: (Optional) If you have a system package installed which is in the above list, then I recommend uninstalling it. However, if you can't uninstall it, then no big deal. It is mostly a precautionary measure. As long as you set the bash environment variables properly, then your compiled version should not reference your system packages. Uninstalling any system packages is by no means required.
Note 2: Removing usbmuxd was required on Debian Jessie 8.10 mentioned in comments.
Build libusbmuxd
cd ~/usr/src/libusbmuxd
./autogen.sh --prefix="$HOME/usr"
make && make install
Build libimobiledevice
cd ~/usr/src/libimobiledevice
./autogen.sh --prefix="$HOME/usr"
make && make install
Build usbmuxd
Unfortunately, sudo make install is required because it needs to write to /lib/udev/rules.d and /lib/systemd/system.
cd ~/usr/src/usbmuxd
./autogen.sh --prefix="$HOME/usr"
make && sudo make install
Build ifuse
cd ~/usr/src/ifuse
./autogen.sh --prefix="$HOME/usr"
make && make install
Connect iPhone
Create a mount point and verify the paths of the tools before executing.
$ mkdir -p ~/usr/mnt $ type -P ifuse
/home/sam/usr/bin/ifuse $ type -P idevicepair
/home/sam/usr/bin/idevicepair
Now attempt to mount using ifuse.
$ idevicepair pair
SUCCESS: Paired with device 37b633350ab83dc815a6a97dcd6d327b12c41968
$ ifuse ~/usr/mnt/
$ ls ~/usr/mnt/
AirFair Books CloudAssets DCIM Downloads FactoryLogs iTunes_Control MediaAnalysis PhotoData Photos PhotoStreamsData PublicStaging Purchases Radio Recordings Safari Vibrations
When you're finished. Unmount ~/usr/mnt using fusermount. For example,
fusermount -u ~/usr/mnt
Browsing Photos
The mounted iPhone has an empty Photos folder. Strangely, this has no photos. Instead, look in the DCIM folder for photos.
I have only copied photos off of my iPhone as a backup. I have not tried copying photos to my iPhone.
Browsing Music
iOS如何实时查看App运行日志的更多相关文章
- iOS实时查看App运行日志
前言: 本文讨论如何实时查看输出在console控制台的日志. 一.Xcode 通过Window->Devices打开devices界面,选择我们的手机,也能看到手机中运行的进程输出的日志.如图 ...
- linux下打开、关闭tomcat,实时查看tomcat运行日志
启动:一般是执行sh tomcat/bin/startup.sh 停止:一般是执行sh tomcat/bin/shutdown.sh脚本命令 查看:执行ps -ef |grep tomcat 输出如下 ...
- linux下重启tomcat、实时查看tomcat运行日志
在Linux系统下,重启Tomcat使用命令操作的! 首先,进入Tomcat下的bin目录 cd /usr/local/tomcat/bin 使用Tomcat关闭命令 ./shutdown.sh 查看 ...
- linux下实时查看tomcat运行日志 2017.12.4
1.先切换到:cd usr/local/tomcat5/logs 2.tail -f catalina.out 3.这样运行时就可以实时查看运行日志了
- 【Tomcat】linux下实时查看tomcat运行日志
今天在部署一个项目到linux服务器的时候一直报错,可是在日志文件中也没有记录.但是在本地测试的时候都没有错误,在windoesServer服务器上也没错误,实在找不到原因,因此想的实时查看tomca ...
- linux下实时查看tomcat运行日志
查看实时日志: tail -f catalina.out Ctrl+c 是退出tail命令
- centos6.9实时查看tomcat运行日志
1.切换到tomcat的logs目录下 cd /usr/local/apache-tomcat-/logs 2.执行命令,查看日志 tail -f catalina.out 3.退出 Ctrl+c
- Centos打开、关闭、结束tomcat,及查看tomcat运行日志
cd到tomcat目录下之后 启动:一般是执行sh bin/startup.sh 停止:一般是执行sh bin/shutdown.sh查看:执行ps -ef |grep tomcat 输出如下 *** ...
- 【转】android IDE——通过DDMS查看app运行时所占内存情况
在Android内存优化方面,我们不可能做到没有大内存的占用情况. 所以有时候要清楚我们的app到底占用了多少内存,哪一步操作占用了多少的内存. 这时候,android的ddms中提供了一个工具,是可 ...
随机推荐
- JS对表单的操作
JS对表单中的style的操作,包括复选框技术 废话不多说直接上文件代码!!! 功能:全选\反选,鼠标监测变颜色 <html> <head> <meta charset= ...
- opencv3.2加载图片
#include <opencv2/opencv.hpp>#include <iostream> using namespace cv;using namespace std; ...
- python struct.pack中的对齐字节问题
最近测试涉及到了序列字节化相关问题,碰到一个头疼的问题 buff = struct.pack("3s","B00") print repr(buff) 输 ...
- c语言实战: 计算时间差
计算时间差有两种,一种是把时间都转化为分钟数,一种是把时间都转化为小时,后者是会用到除法所以不可避免产生浮点数,所以我们选择转化为分钟数来计算. //题目:给定两个时间点计算它们的时间差,比如,1:5 ...
- window.location和window.location.href和document.location的关系
1,首先来区分window.location和window.location.href. window.location.href是一个字符串. 而window.location是一个对象,包含属性有 ...
- js/jq基础(日常整理记录)-4-一个简单的自定义tree插件
一.一个简单的自定义tree插件 上一篇是之前自定义的table插件,这一篇也是之前同期尝试做的一个tree插件. 话不多说,先看看长什么样子哈! 现在来看确实不好看,以后在优化吧! 数据源:ajax ...
- 解决批处理命令执行完毕后自动关闭cmd窗口方法
问题描述: 日常开发工作中,为了节省多余操作导致浪费时间,我们经常会自己建一些批处理脚本文件(xx.bat),文件中包含我们需要执行的命令,有时候我们希望执行完毕后看一下执行的结果,但是窗口执行完毕后 ...
- 《Linux内核设计与实现》读书笔记(五)- 系统调用
主要内容: 什么是系统调用 Linux上的系统调用实现原理 一个简单的系统调用的实现 1. 什么是系统调用 简单来说,系统调用就是用户程序和硬件设备之间的桥梁. 用户程序在需要的时候,通过系统调用来使 ...
- ubuntu - 14.04,安装Eclipse(开源开发工具)
一,安装JDK:Eclipse必须有JDK才能运行,所以首先我们确定系统是否已经安装了JDK,我们在shell里面输入:“java -version”,如果已经安装了,就会打印出来当前JDK版本信息, ...
- [Django笔记] views.py 深入学习
views.py 是django MTV 中的主要逻辑层,相当于MVC中的 Controller 以下的实例都基于这样一个路由表: urlpatterns = [ url(r'^(index)?$', ...