0


在VScode中如何在Vue项目里使用debug

1.安装必要的插件JavaScript Debugger

2.在".vscode"文件中添加launch.json文件

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "type": "chrome",
  6. "request": "launch",
  7. "name": "Launch Chrome against localhost",
  8. "url": "http://localhost:5173",
  9. "webRoot": "${workspaceFolder}/src",
  10. "breakOnLoad": true,
  11. "sourceMaps": true,
  12. "skipFiles": [
  13. "node_modules/**"
  14. ],
  15. "sourceMapPathOverrides": {
  16. "webpack:///src/*": "${webRoot}/*"
  17. }
  18. }
  19. ]
  20. }

3.进行debug

1.按

  1. Ctrl+Shift+D

打开调试面板。

2.启动 Vue 项目:在终端中运行

  1. npm run dev
  1. 3.

在 VS Code 中按

  1. F5

或点击调试面板中的绿色三角形按钮开始调试。这会启动 Chrome 浏览器,并自动打开

  1. http://localhost:5173

就可以进行debug了

标签: vscode vue.js ide

本文转载自: https://blog.csdn.net/m0_72562705/article/details/140297232
版权归原作者 WisonWei 所有, 如有侵权,请联系我们删除。

“在VScode中如何在Vue项目里使用debug”的评论:

还没有评论