在vs代碼中,我已經在一個HTML angularjs項目中創建了一個launch.json
文件。我無法在本地主機中啓動項目。它一直說Failed to load resource: net::ERR_CONNECTION_REFUSED (http://localhost:8080/)
。本地主機不工作 - 鉻代碼擴展在vs代碼
項目結構: -
Project => .vscode => launch.json
=> app
=> scripts
=> styles
=> index.html
launch.json: -
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080",
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
},
{
"name": "Attach to Chrome, with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
}
]
}
有人能幫我解決這個問題?在此先感謝
什麼是你'的/ etc/hosts'的內容? –
@YanYang您是否在問項目結構?我已更新該帖子。你能檢查它嗎? –
@YanYang你是什麼意思'/ etc/hosts'? –