N. *_*eld 4 visual-studio-code
安装了 vscode-chrome-debug 扩展并尝试启动 angular.js 站点。我能够连接到 chrome 调试器,但是通过 localhost:9009 访问任何资源(如 /index.html 或 /json)都无法加载。在开发者模式下运行 Chrome 以禁用扩展。
有没有人处理过这个问题?这是扩展程序中的错误吗?如果有人看到我做错了什么,请告诉我。谢谢!
启动文件
{
"name": "Launch localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9009/index.html",
"webRoot": "${workspaceRoot}",
"diagnosticLogging": true,
"userDataDir": "c:\\out\\chrome\\",
"sourceMaps": false
}
Run Code Online (Sandbox Code Playgroud)
调试控制台输出
›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)
Run Code Online (Sandbox Code Playgroud)
我的设置中缺少一个步骤...我需要运行一个网络服务器!看起来很明显,但我假设调试扩展正在幕后做一些事情,以在给定静态文件位置的情况下为站点提供服务。
我设置了一个 gulpfile 和任务来运行 gulp-webserver。我运行了启动任务,然后启动了调试器,它工作正常。
| 归档时间: |
|
| 查看次数: |
5001 次 |
| 最近记录: |