网页跳转断点
对 JS 处理的网页跳转进行 debug 技巧。
改属性
对 dom 进行 break on -> attribute modifactions
JS 全量搜索
对部分动态加载、混淆、eval 或 function 的代码,无法正常搜索。
参考:https://stackoverflow.com/questions/57141048/how-to-access-and-search-code-in-debugger-vm-files-in-google-chrome-devtools
打开 Search in anonymous and content scripts,即可全部搜索
JS 跳转
针对 location.href 的跳转,
参考:https://stackoverflow.com/questions/38515237/chrome-breakpoint-when-location-href-is-set
// Source - https://stackoverflow.com/a/79672916
// Posted by Hugh Allen
// Retrieved 2026-01-19, License - CC BY-SA 4.0
debug(Object.getOwnPropertyDescriptor(location,'href').set)
// undebug(Object.getOwnPropertyDescriptor(location,'href').set)
即可正常断点