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.

相关文章:

  • 2022-12-23
  • 2021-12-27
  • 2021-12-04
  • 2021-08-23
  • 2021-11-02
  • 2021-12-18
  • 2022-12-23
  • 2019-03-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案