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

推荐订阅源

C
CERT Recently Published Vulnerability Notes
K
Kaspersky official blog
S
Schneier on Security
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
The Register - Security
The Register - Security
T
Threat Research - Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园_首页
I
Intezer
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
Project Zero
Project Zero
Recorded Future
Recorded Future
C
Cybersecurity and Infrastructure Security Agency CISA
Vercel News
Vercel News
A
Arctic Wolf
P
Palo Alto Networks Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
S
SegmentFault 最新的问题
Know Your Adversary
Know Your Adversary
P
Privacy & Cybersecurity Law Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
P
Privacy International News Feed
G
GRAHAM CLULEY
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
Simon Willison's Weblog
Simon Willison's Weblog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
Cyberwarzone
Cyberwarzone
L
Lohrmann on Cybersecurity
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog

博客园 - 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...

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