【发布时间】:2016-03-18 00:34:05
【问题描述】:
我已经在 VS Code 中安装了 Debugger for Chrome extension 0.2.0,但我似乎无法正确配置 launch.json。我正在使用琐碎的 Express App 样板 here。我有 --remote-debugging-port=9222 的 chrome 快捷方式。一切都适用于本机“类型”:节点配置。 Express 样板与节点 ./bin/www 一起运行,并且在 chrome 中可见 http://localhost:3000 以获取上下文。我正在寻找一个“请求”:启动条目,其工作方式类似于样板“名称”:“启动”“类型”:“节点”配置。也就是说,启动 Chrome 并显示网页,以便我可以设置客户端断点。
我的 chrome 的 launch.json 条目如下。
{
"name": "Launch localhost with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost",
"webRoot": "./bin",
"sourceMaps": true
}
【问题讨论】: