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.
浙公网安备 33010602011771号