vscode调试golang程序的launch.json
记录备忘,包括调试整个工程、调试main.go、调试当前文件三种情况,可能满足绝大多数调试场景的需要。
{ "version": "0.2.0", "configurations": [ { "name": "Launch Package", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}", "env": {}, "args": [], "showLog": true }, { "name": "Launch main.go", "type": "go", "request": "launch", "mode": "debug", "program": "${workspaceFolder}/main.go", "env": {}, "args": [], "showLog": true }, { "name": "Debug Current File", "type": "go", "request": "launch", "mode": "debug", "program": "${file}", "env": {}, "args": [], "showLog": true } ] }

浙公网安备 33010602011771号