Vue使用debugger
vue开发时会遇到需要调试代码的情况,使用debugger可以很方便的进行debug.
1.找到eslintConfig文件
  "rules": {
       "no-async-promise-executor": "off",
"no-unused-vars": "off",
"comma-dangle": "off",
"no-debugger": "off"
}
2.build/webpack.dev.conf.js
将devtool: '#cheap-module-eval-source-map',改为devtool: '#eval-source-map ',
  
devtool介绍:
https://webpack.js.org/configuration/devtool/#development
webpack——devtool配置及sourceMap的选择
webpack——devtool里的7种SourceMap模式
重启vue,
参考:
https://blog.csdn.net/xyx107/article/details/104396772
https://blog.csdn.net/qq_23064501/article/details/112621440
  
    技术改变世界

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号