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中提供了一个工具,是可 ...
随机推荐
- java中用正则表达式判断中文字符串中是否含有英文或者数字
public static boolean includingNUM(String str)throws Exception{ Pattern p = Pattern.compile(" ...
- Ros学习——值得学习的package
RViz是一款强大的可视化工具,它允许你查看机器人中的传感器和内部状态. TF程序包(package)提供在机器人所使用到的各种坐标系之间的变换功能,并保持跟踪这些变换的变化. actionlib - ...
- 339E Three Swaps
传送门 题目大意 给出由1-n组成的序列,每次可将一个区间翻转.问如何从1-n的递增序列变成给出的序列,输出操作次数以及每次操作的区间.最多翻转3次,保证有解,输出任意方案即可. 分析 我们对于每一次 ...
- DesertWind TopCoder - 1570
传送门 分析 首先我们要知道为了情况最坏,无论你到哪,一定会在你前往绿洲的最短路上的那片沙子上刮风,所以这个点到绿洲的最短路即为他相连的点中到绿洲距离最短的距离+3和次短的距离+1的最小值,具体实现见 ...
- Python程序设计2——列表和元组
数据结构:更好的说法是从数据角度来说,结构化数据,就是说数据并不是随便摆放的,而是有一定结构的,这种特别的结构会带来某些算法上的性能优势,比如排序.查找等. 在Python中,最基本的数据结构是序列( ...
- Bootstrap 的 Collapse
一.简介 Collapse 插件为 HTML 标签提供折叠.展开行为,依赖 transition.js(bootstrap.js 文件中已包含). 二.实现机制 实现 Collapse 效果需要: 一 ...
- Java基础-集合框架-ArrayList源码分析
一.JDK中ArrayList是如何实现的 1.先看下ArrayList从上而下的层次图: 说明: 从图中可以看出,ArrayList只是最下层的实现类,集合的规则和扩展都是AbstractList. ...
- 让 Winform 窗口悬浮的简单方式
很多次设置这个 TopMost 属性会莫名的不起作用,有时又可以.一直在想是为什么会这样? 后来多次尝试,发现这个属性必须在窗体某些其他属性后设置,比如在 Height.Width 这样的属性后. 看 ...
- 从零开始搭建.NET Core 2.0 API(学习笔记一)
从零开始搭建.NET Core 2.0 API(学习笔记一) 一. VS 2017 新建一个项目 选择ASP.NET Core Web应用程序,再选择Web API,选择ASP.NET Core 2. ...
- Sqlserver根据条件去除重复数据并且留下的是最大值数据
项目中需要根据条件获取一些数据,但是如果条件相同的情况下,要去掉条件一样的并且某个值是最小的数据,留下的是最大值数据. 简单记录一下sql: --去重保留最大值那条 --Year和MCode一样的前提 ...