我正在使用 visual studio代码 + 调试器进行chrome扩展来构建用于开发chrome扩展的IDE。经过一番试验和错误,我使用附加到chrome,使用sourcemaps 调试模式成功运行了源java脚本。但是当我使用调试控制台时,chrome总是立即崩溃... 我该如何解决这个问题?
调试器在断点处暂停,但是当我使用调试控制台时,chrome总是立即崩溃。
launch.json
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://10.19.202.100:8080",
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
},
{
"name": "Attach to Chrome, with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"webRoot": "${workspaceRoot}/src"
}
]
}
答案 0 :(得分:1)
从控制台启动Chrome
google-chrome --remote-debugging-port=9222 --enable-nacl