1、F5点击配置Launch.json,  把program那个变量的值改一下,改成 "program": "${workspaceFolder}", 意思是调试的时候,以当前打开的文件夹根目录作为工程目录进行调试。

2、若报错提示 

Build Error: go build -o c:\Users\yangqing\Documents\Gitee\go_dev\src__debug_bin.exe -gcflags all=-N -l .
go: go.mod file not found in current directory or any parent directory; see 'go help modules' (exit status 1)

在cmd处, go env -w GO111MODULE=auto