前端断点调试骚操作

F12 调试模式开启

1、普通方法断点调试: console面板输入方法名回车,然后双击结果进入方法内,然后任意断点。

 

2、Vue 渲染方式,方法断点: document.querySelector(selector)["__vue__"].funName.

 

3、视窗跳转前强制拦截(如系统登出):window.onbeforeunload = function(){ debugger };

强制阻塞退出前的时间点,可以有特殊用途(如哪个请求开始导致退出,检测cookie状态)

猜你喜欢

转载自www.cnblogs.com/xtreme/p/12924075.html