有没有办法强制 Chrome 的调试器在单步执行代码时跳过特定的源文件或函数?
问问题
2942 次
2 回答
8
这现在在 Chrome 开发人员工具中作为“框架黑盒”功能提供:https ://developer.chrome.com/devtools/docs/blackboxing
更新链接:https ://developers.google.com/web/tools/chrome-devtools/javascript/reference#blackbox
于 2015-04-14T19:55:43.587 回答
2
对于那些通过 VS Code 中的 Chrome 调试扩展进行调试的人,您可以添加skipfiles
到launch.json
. 这是我的:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "attach",
"name": "Attach Chrome against localhost",
"url": "http://localhost:4200/**",
"webRoot": "${workspaceFolder}",
"port": 9222,
"skipFiles": [
"node_modules/**/*.js",
"runtime.js",
"polyfills.js",
"vendor.js",
"analytics.js"
]
}
]
}
于 2020-06-05T17:39:36.570 回答