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這樣的工具的工作比我自己更清楚(當時)。現在我已經在前端遊戲中游泳了,它更加完整。 –