2017-03-07 103 views
0

loving 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中取得了一些成功。在vscode中調試grommet-cli sample-app

這是我目前的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}" 
    } 
] 

}

回答

1

This似乎解決該問題。希望它已被添加到最新版本的VS.

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