2
安装vscode-chrome-debug扩展并尝试启动angular.js站点。我能够连接到chrome调试器,但通过localhost:9009访问任何资源(如/index.html或/ json)无法加载。在开启模式下运行chrome以禁用扩展。vscode-chrome-debug加载资源失败ERR_CONNECTION_REFUSED
有没有人处理过这个?这是扩展中的错误吗?如果有人看到我做错了什么,请告诉我。谢谢!
launch.json
{
"name": "Launch localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9009/index.html",
"webRoot": "${workspaceRoot}",
"diagnosticLogging": true,
"userDataDir": "c:\\out\\chrome\\",
"sourceMaps": false
}
调试控制台输出
›OS: win32 ia32
›Node: v5.10.0
›vscode-chrome-debug-core: 0.1.7
›debugger-for-chrome: 0.4.6
›spawn('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe', ["--remote-debugging-port=9222","--no-first-run","--no-default-browser-check","--user-data-dir=c:\\out\\chrome\\","http://localhost:9009/index.html"])
›Attempting to attach on 127.0.0.1:9222
Failed to load resource: net::ERR_CONNECTION_REFUSED (http://localhost:9009/index.html)
这是一个简单的修复方法,你会认为这将在Chrome的调试器的贡献部分。谢谢!我现在开始运行了... –
我认为开发人员对使用像Grunt,Gulp和Node这样的工具的工作比我自己更清楚(当时)。现在我已经在前端游戏中游泳了,它更加完整。 –