【Go】使用VSCode启动debug模式的Go程序提示go.mo异常解决
问题背景
使用VSCode Start Debugging后
控制台打印:
go.mod file not found in current directory or any parent directory
解决办法
进入当前go文件所在的目录下
执行
go mod init 模块名
再Start Debugging就好了
使用VSCode Start Debugging后
控制台打印:
go.mod file not found in current directory or any parent directory
进入当前go文件所在的目录下
执行
go mod init 模块名
再Start Debugging就好了
