使用Vscode调试Nuxt服务端代码初步总结:由于最近一些推广项目,使用nuxt快速开发了一个前端项目。纯vue的开发模式就不一样了,除了一些新的语法,包括很多不清楚的配置。这里主要记录使用vscode调试nuxt服务,主要是asyncData快速启动vscode插件安装vscode搜索安装:DebuggerForChrome,这里初始化.vscode/launch.json,使用默认配置配置相关配置。将extend(config,ctx)添加到nuxt.config.js{constpath=require('path');config.devtool='#source-map'//下面我们看一下//保存时运行ESLint//if(ctx.isDev&&ctx.isClient){//if(ctx.isDev&&ctx.isClient){//config.devtool='#source-map'//}//}}}启动debug1,点击run调试运行npmrundev2,启动后查看debug,查看debug相关文件是否正常
