網站首頁 編程語言 正文
鏈接
首先安裝 vs-code 插件
接下來配置vs-code
我使用的vue-cli3構建的項目因此設置并更新 vue.config.js 內的 devtool property:
module.exports = {
configureWebpack: {
devtool: 'source-map'
}
}
再之后
點擊在 Activity Bar 里的 Debugger 圖標來到 Debug 視圖,然后點擊那個齒輪圖標來配置一個 launch.json 的文件,選擇 Chrome/Firefox:Launch 環境。然后將生成的 launch.json 的內容替換成為相應的配置:
json文件如下:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
},
{
"type": "firefox",
"request": "launch",
"name": "vuejs: firefox",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"pathMappings": [{ "url": "webpack:///src/", "path": "${webRoot}/" }]
}
]
}
最后在需要調試的地方加 上debugger 就可以了
原文鏈接:https://blog.csdn.net/weixin_38500689/article/details/113383758
相關推薦
- 2022-07-30 基于docker安裝zabbix的詳細教程_zabbix
- 2022-09-17 python?pandas處理excel表格數據的常用方法總結_python
- 2023-04-12 C#?DataGridView行列轉換的具體實現_python
- 2022-09-13 Nginx報錯104:Connection?reset?by?peer問題的解決及分析_nginx
- 2022-06-08 nacos項目啟動報錯:Connection refused: no further informa
- 2023-05-06 Python正則表達式中group與groups的用法詳解_python
- 2022-04-01 k8s 1.22 安裝ingress報錯the server could not find the
- 2022-07-10 python日志管理loguru模塊實操
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支