堂Di

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Step 1: set a debug configration on /.vscode/launch.json, like this:

"configurations": [
{
"name": "Launch Chrome For Debug",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"userDataDir": "${workspaceRoot}/.vscode/chrome"
}
]

step 2 : In vscode's terminal, run >npm start . The default browser will auto open http://localhost:8000

step 3 : Open VSCode's debug panel, choose the "Launch Chrome For Debug" and click the Debug button. A chrome browser will be opened.

posted on 2019-03-14 14:20  堂Di  阅读(903)  评论(0编辑  收藏  举报