【问题标题】:Debug grommet-cli sample-app in vscode在 vscode 中调试 grommet-cli 示例应用程序
【发布时间】:2017-07-27 22:57:33
【问题描述】:

喜欢 Grommet 和 vscode。试图让他们一起玩。我可以让 Express 和 vscode 工作,如 here 所示。我想让grommet-cli sample app 以类似方式工作。 Express 有一个启动命令:“npm start”,其中 grommet-cli 有两个:“npm run dev-server”和“npm run dev”(不知道如何在 vscode 中启动它们。我想我可能需要multi-session debugging ?)。如何设置 launch.json 来调试示例应用程序?我希望能够在 IE/Edge 中进行调试。我使用 Debugger for 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}"
    }
]

}

【问题讨论】:

    标签: node.js visual-studio-code grommet


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-28
      • 2016-07-06
      • 1970-01-01
      • 1970-01-01
      • 2019-01-12
      • 2016-08-28
      • 2018-09-05
      相关资源
      最近更新 更多