浏览器调试
2020-02-26 本文已影响0人
waysun375
1.浏览器调试窗口
- f12打开调试窗口
- 点击窗口右上方三个.图标可以选择窗口位置
-
file
2.浏览器pc、手机模式切换
- 点击窗口左上方第二个图标切换手机、pc模式
- 手机模式下可以选择机型,屏幕宽高等
-
file
3.页面元素调试
- 选择页面查看位置右键,检查
- 选择elements菜单下元素右键,操作元素
-
file
4.页面元素状态
- 选择元素右键,选择force state,在选择状态(hover)
5.页面元素状态改变断点
- 选择元素右键,选择break on,选择改变类型
- 移除元素断点
-
file
6.元素样式调试
- 选择要调试的元素
- 查看styles
-
file
7.元素样式调试:hov
- 查看元素styles
- 选择:hov,选择不同状态
-
file
8.元素盒模型
- 查看元素styles
- 最下面盒模型,查看,修改
-
file
9.元素最终样式
- 查看元素computed
-
file
10.元素事件查看
- 查看元素事件event listeners
-
file
事件查看.png)
11.console
- 可以看调试,报错信息
- 可以写js测试代码
-
file
12.console设置
-
file
13.资源格式化
-
file
14.网站资源
- 资源可以修改,保存等
-
file
15.执行栈
- 资源打断点,call stack显示执行栈(压栈)
- 执行后从上到下出栈
- (有时不好去断点,先格式化)
-
file
- 断点
-
file
16.样式调试同步
- 在sources的filesystem下 +add...添加文件目录
- 修改元素样式会自动同步修改文件
-
file
17.网络资源加载
- network
-
file
18.网络设置项
- network
-
file
19.页面重绘查看
- 设置rendering工具
-
file
-
file
20.资源使用率
- 设置coveraqe工具
-
file
-
file
21.页面动画查看
- 设置animations工具
-
file
-
file
22.user agent模拟
- 设置network conditions工具
-
file
-
file
23.资源查找
- sources下
-
file
24.手机调试
- 设置remote devices工具
-
file
-
file
25.请求资源过滤
- 设置request blocking工具
-
file
-
file
26.资源查找
- 设置search工具
-
file
-
file
27.设备传感模拟
- 设置sensors工具
-
file
-
file
28.页面性能performance
- 打开performance
-
file
29.页面性能performance执行时间
- 打开performance,选择call tree
-
file
-
file
30.页面性能performance性能占比
- 打开performance,选择call tree
-
file
31.内存理论
- 栈(简单类型),堆(引用类型)
32.内存理论
- 全局变量,内存回收,内存泄漏
33.内存理论
-
file
34.描述文件manifest
- 点击application下manifest
-
file
35.描述文件manifest
- 点击application下manifest
-
file
36.描述文件service workers
- ???
37.描述文件service workers
- 点击application下service workers ???
-
file
38.清除存储clear storage
- 点击application下clear storage
-
file
39.localstorage
- 点击application下storage下local storage
-
file
40.sessionstorage
- 点击application下storage下session storage
-
file
41.indexeddb
- 点击application下storage下indexeddb
-
file
42.web sql(废弃)
- 点击application下storage下web sql
-
file
43.cookies
- 点击application下storage下cookies
-
file
44.离线存储cache
- 点击application下cache(描述文件manifest设置缓存文件)
-
file
45.资源保存
- 点击application下frames(需要的资源右键,save)
-
file
46.https安全性
- 点击security
-
file
47.性能审计
- 点击audits
-
file
48.性能审计
- 点击audits ???
-
file
49.性能审计
- 点击audits ???
-
file
50.参考
- 参考
50 个 Chrome Developer Tools 必备技巧
视频