实用技巧

调试技巧

技巧 说明
$0 - $4 最近选择的DOM元素
$('selector') document.querySelector简写
$$('selector') document.querySelectorAll简写
$_ 上一个表达式的结果
copy() 复制到剪贴板
monitor(fn) 监视函数调用
debug(fn) 设置函数断点
undebug(fn) 移除函数断点

移动端调试

功能 说明
设备模式 Toggle device toolbar 模拟移动设备
网络节流 模拟不同网络环境
触摸模拟 Enable touch 模拟触摸事件
地理位置 Sensors → Location 模拟GPS
方向传感器 Sensors → Orientation
← Chrome Console Shortcuts Pdf Generation →