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

Ken*_*Ken 7 visual-studio-code

我在VS Code中安装了Debugger for Chrome扩展0.2.0,但我似乎无法获得launch.json配置.我现在用的是琐碎的快速应用boilerplace 这里.我有--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
    }       
Run Code Online (Sandbox Code Playgroud)

Rob*_*ens 3

我是这个扩展的开发者。根据您提供的信息,您需要设置"url""http:localhost:3000"并且可能"webRoot"设置为"./bin/www"。如果您仍有问题,请告诉我。