适用于Chrome node.js的VS Code + Debugger

时间:2015-12-12 00:17:32

标签: visual-studio-code

我已在VS Code中安装了适用于Chrome扩展程序0.2.0的Debugger,但我似乎无法正确启动launch.json。我正在使用琐碎的Express App锅炉here。我有--remote-debugging-port = 9222的chrome快捷方式。使用本机"类型":节点配置,一切正常。 Express样板与节点./bin/www一起运行,并在http://localhost:3000处的chrome中可见,以获取上下文。我正在寻找一个"请求":启动条目,其功能类似于样板文件" name":" Launch" "输入":"节点"组态。也就是说,启动Chrome并显示网页,以便我可以设置客户端断点。

我的chrome.json条目是以下内容。

    {
        "name": "Launch localhost with sourcemaps",
        "type": "chrome",
        "request": "launch",
        "url": "http://localhost",
        "webRoot": "./bin",
        "sourceMaps": true
    }       

1 个答案:

答案 0 :(得分:3)

我是此扩展程序的开发人员。根据您提供的信息,您需要将"url"设置为"http:localhost:3000",并将"webRoot"设置为"./bin/www"。如果你还有问题,请告诉我。