惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
Project Zero
Project Zero
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
Security Latest
Security Latest
Spread Privacy
Spread Privacy
aimingoo的专栏
aimingoo的专栏
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
U
Unit 42
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Scott Helme
Scott Helme
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
爱范儿
爱范儿
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Schneier on Security
Schneier on Security
Latest news
Latest news
GbyAI
GbyAI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
PCI Perspectives
PCI Perspectives
Jina AI
Jina AI
AI
AI
NISL@THU
NISL@THU
I
Intezer
G
GRAHAM CLULEY
B
Blog
S
Secure Thoughts
IT之家
IT之家
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
V2EX - 技术
V2EX - 技术
Recorded Future
Recorded Future
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - chaoguo1234

如何自定义 UIScrollView 的减速系数 Plist 二进制格式 UIImageView 设置图片不生效的原因排查 Any metadata 的内存布局 Mach-O 文件结构 Block Copy 的内存布局详解 __block 变量内存布局详解 Block 内存布局详解 XNU Inside: iOS 模拟器 NSMutableDictionary 的内存布局 NSDictionary 内存布局 WebKit Inside: GPU 进程调试 WebKit Inside: 渲染树 WebKit Inside: px 与 pt WebKit Inside: CSS 的匹配原理 dyld: 神秘的 __dso_handle 一文搞懂 ARM 64 系列: ADD(立即数版) 一文搞懂 ARM 64: AUTIBSP 一文搞懂 ARM 64 系列: PACISB XCode 编译 PAG 源码 一文搞懂 ARM 64 系列: 一文搞懂 ARM 64 系列: 函数调用传参与返回值 一文搞懂 ARM 64 系列: 寄存器
WebKit Insie: WebKit 调试(二)
chaoguo1234 · 2025-09-20 · via 博客园 - chaoguo1234

1 调试 WebKit 的方式

调试WebKit常见的方式是在Apple提供的WebKit workspace新建一个Project进行调试。

这种方式最适合我们深入研究WebKit的源码

而在工作中,公司项目有时会遇到一些WebKit的问题,这种时候就有2种调试方式可以选择。

1种方式,就是在我们新建于WebKit workspace里的Project进行调试。

但是,这种方式需要我们能构建出公司项目的环境,以便复现问题。

通常,构建公司项目环境并不是一个简单的过程。

2种方式,就是直接将公司项目中使用的WebKit,替换成我们自己编译的,可以调试的WebKit

通过这种方式,可以避免构建公司项目环境的过程

2 公司项目中 WebKit 的调试

1 编译好AppleWebKit源码。编译方法可以参见WebKit官网或者《Xcode 编译 WebKit》

2在公司项目的Xcode菜单中,选择File -> Project Settings...

image

3 在弹出的对话框中,选择Advanced...

image

4 在弹出的对话框中,做如下配置:

image

其中,ProductsIntermediates中的路径,为第1步中,WebKit源码编译后产物所在目录。

做好这些设置之后,在公司项目里就可以调试WebKit源码了。

需要注意的是,如果公司项目是一个workspace,那么第2步中的菜单会是File -> workspace settings...

同时,此方法只能用在模拟器上。