debuserver
手机上的 debugserver 位置,此文件只读,所以需要将此文件拷贝出来,进行权限配置,然后再拷贝会手机另一个目录。
/Developer/usr/bin/debugserver
给 debugserver 配置权限
1.新建文件 ent.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.backboardd.debugapplications</key>
<true/>
<key>com.apple.backboardd.launchapplications</key>
<true/>
<key>com.apple.diagnosticd.diagnostic</key>
<true/>
<key>com.apple.frontboard.debugapplications</key>
<true/>
<key>com.apple.frontboard.launchapplications</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.springboard.debugapplications</key>
<true/>
<key>com.apple.system-task-ports</key>
<true/>
<key>get-task-allow</key>
<true/>
<key>platform-application</key>
<true/>
<key>run-unsigned-code</key>
<true/>
<key>task_for_pid-allow</key>
<true/>
</dict>
</plist>
2.赋予权限
ldid -Sent.xml debugserver
放到手机中
拷贝到手机/usr/bin
目录端口映射
iproxy 2222:22 4444:4444
- 手机开启 debugser 端口监听
debugserver localhost:4444 --attach WeChat
- macOS 开启 lldb 调试
process connect connect://localhost:4444