在 vscode 中调试 grommet-cli 示例应用程序

Debug grommet-cli sample-app in vscode

Grommet and vscode. Trying to get them to play together. I am able to get Express and vscode working as shown here. I would like to get the grommet-cli sample app to work similarly. Express has one command to start: "npm start" where grommet-cli has two: "npm run dev-server" and "npm run dev" (not sure how to start them both in vscode. I think I may need multi-session debugging?)。如何设置 launch.json 来调试示例应用程序?我希望能够在 IE/Edge 中进行调试。我在 Chrome 中使用 Chrome 扩展的调试器取得了一些成功。

这是我现在的 launch.json:

{
"version": "0.2.0",
"configurations": [
    {
        "type": "chrome",
        "request": "launch",
        "name": "Launch Chrome against localhost",
        "url": "http://localhost:3000",
        "webRoot": "${workspaceRoot}"
    },
    {
        "type": "chrome",
        "request": "attach",
        "name": "Attach to Chrome",
        "port": 9222,
        "webRoot": "${workspaceRoot}"
    }
]

}

This 似乎可以解决问题。希望它已添加到最新版本的 VS 中。

"compounds": [
    {
        "name": "Node+Browser",
        "configurations": [ "Server", "Browser" ]
    }
],
"configurations" [
    {
        "name": "Browser",
        "type": "chrome",
        //...
    },
    {
        "name": "Server",
        "type": "node",
        //...
    }
]