admin管理员组文章数量:1122846
I have a simple HTML/JavaScript application that I want to debug in VS Code by attaching to the Chrome instance.
I am using Live Server extension to run the app on port 5500: http://localhost:5500/
I am interested only in the "Attach" setting. Launch is working fine.
In my launch.json
file, I have this defined:
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Chrome",
"type": "chrome",
"request": "attach",
"port": 9222,
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:5500/",
"webRoot": "${workspaceFolder}"
}
]
}
I added 9222 port to enable remote debugging to Chrome:
C:\Users\MyUsername\AppData\Local\Google\Chrome\Application\chrome.exe --remote-debugging-port=9222
But my breakpoints are not being hit and I get this popup message box:
What's the problem?
I have read similar posts, but have not found a solution.
本文标签: vscode debuggerWhy is Attach to Chrome VS Code debug not workingStack Overflow
版权声明:本文标题:vscode debugger - Why is Attach to Chrome VS Code debug not working? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310586a1934431.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论