Skip to content

Debug process fails to start in Test mode as unable to find __debug_bin file #1701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pantelis-karamolegkos opened this issue Aug 18, 2021 · 13 comments
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@pantelis-karamolegkos
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go from the VS Code integrated terminal.
▶ go version
go version go1.16 darwin/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
▶ gopls -v version
zsh: command not found: gopls
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
▶ code -v
1.59.0
379476f0e13988d90fab105c5c19e7abc8b1dea8
x64
  • Check your installed extensions to get the version of the VS Code Go extension
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

(check at the end of the issue)

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

    "go.formatTool": "goimports",
    "go.lintTool": "golangci-lint",
    "editor.fontLigatures": true,
    "go.lintFlags": [
        "--fast"
    ],
   "go.useLanguageServer": true,
   "go.toolsManagement.autoUpdate": true,
    "go.delveConfig": {
        "dlvLoadConfig": {
            "followPointers": true,
            "maxVariableRecurse": 1,
            "maxStringLen": 400,
            "maxArrayValues": 400,
            "maxStructFields": -1
        },
        "apiVersion": 2,
        "showGlobalVariables": false
    },

Describe the bug

Debug in test mode fails to run with message described below

Steps to reproduce the behavior:

I am hitting the Debug button in VSCode and select the Test mode
with the following configurations being available

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceRoot}",
                "env": {
                    "VAR1": "admin",
                    "VAR2": "supersecretpassword",
                    "VAR3": "doesnotmatter_1",
                    "VAR3": "doesnotmatter_2",
                },
        },
            {
                "name": "Test",
                "type": "go",
                "request": "launch",
                "mode": "test",
                "program": "${workspaceRoot}",
                "env": {
                    "VAR1": "admin",
                    "VAR2": "supersecretpassword",
                    "VAR3": "doesnotmatter_1",
                    "VAR4": "doesnotmatter_2",
                },
                    "trace": "verbose",
                    "showLog": true,
                    "logOutput": "dap",
            }
    ]
}

and for the first time in my life I get the following error:

Screenshot 2021-08-18 at 7 39 31 PM

(when selecting the Debug mode the process seems to be working as expected)

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

Debug output

(omitted the line with the env vars, containing sensitive info and was too large to filter out appropriately)

API server listening at: 127.0.0.1:64459
2021-08-18T19:31:35+03:00 debug layer=dap DAP server pid = 13522
2021-08-18T19:31:35+03:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","locale":"en-gb","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true}}
2021-08-18T19:31:35+03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":true,"supportsClipboardContext":true}}
2021-08-18T19:31:35+03:00 debug layer=dap debug backend is 'default'
2021-08-18T19:31:35+03:00 debug layer=dap building binary '/Users/pantelis/Workspace/systems-utils/eck-user-mgmt/__debug_bin' from '/Users/pantelis/Workspace/systems-utils/eck-user-mgmt' with flags ''
2021-08-18T19:31:36+03:00 debug layer=dap running program in /Users/pantelis/Workspace/systems-utils/eck-user-mgmt

Starting: /Users/pantelis/go/bin/dlv-dap dap --listen=127.0.0.1:64459 --log=true --log-output=dap --log-dest=3
2021-08-18T19:31:36+03:00 debug layer=dap Failed to launch: could not launch process: open /Users/pantelis/Workspace/systems-utils/eck-user-mgmt/__debug_bin: no such file or directory
2021-08-18T19:31:36+03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":false,"command":"launch","message":"Failed to launch","body":{"error":{"id":3000,"format":"Failed to launch: could not launch process: open /Users/pantelis/Workspace/systems-utils/eck-user-mgmt/__debug_bin: no such file or directory"}}}

Go configuration tools

Checking configured tools....
GOBIN: undefined
toolsGopath: 
gopath: /Users/pantelis/go
GOROOT: /usr/local/go
PATH: /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/usr/local/opt/[email protected]/bin:/Users/panteliskaramolegkos/opt/anaconda3/bin:/Users/panteliskaramolegkos/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin

	go:	/usr/local/go/bin/go: go version go1.16 darwin/amd64

	gopkgs:	/Users/pantelis/go/bin/gopkgs: go1.16
		path	github.com/uudashr/gopkgs/v2/cmd/gopkgs
		mod	github.com/uudashr/gopkgs/v2	v2.1.2	h1:A0+QH6wqNRHORJnxmqfeuBEsK4nYQ7pgcOHhqpqcrpo=
		dep	github.com/karrick/godirwalk	v1.12.0	h1:nkS4xxsjiZMvVlazd0mFyiwD4BR9f3m6LXGhM2TUx3Y=
		dep	github.com/pkg/errors	v0.8.1	h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
	
	go-outline:	/Users/pantelis/go/bin/go-outline: go1.16
		path	github.com/ramya-rao-a/go-outline
		mod	github.com/ramya-rao-a/go-outline	v0.0.0-20210608161538-9736a4bde949	h1:iaD+iVf9xGfajsJp+zYrg9Lrk6gMJ6/hZHO4cYq5D5o=
		dep	golang.org/x/tools	v0.1.1	h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs=
	
	gotests:	/Users/pantelis/go/bin/gotests: go1.16
		path	github.com/cweill/gotests/gotests
		mod	github.com/cweill/gotests	v1.6.0	h1:KJx+/p4EweijYzqPb4Y/8umDCip1Cv6hEVyOx0mE9W8=
		dep	golang.org/x/tools	v0.0.0-20191109212701-97ad0ed33101	h1:LCmXVkvpQCDj724eX6irUTPCJP5GelFHxqGSWL2D1R0=
	
	gomodifytags:	/Users/pantelis/go/bin/gomodifytags: go1.16
		path	github.com/fatih/gomodifytags
		mod	github.com/fatih/gomodifytags	v1.13.0	h1:fmhwoecjZ5c34Q2chjRB9cL8Rgag+1TOSMy+grissMc=
		dep	github.com/fatih/camelcase	v1.0.0	h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
		dep	github.com/fatih/structtag	v1.2.0	h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
		dep	golang.org/x/tools	v0.0.0-20180824175216-6c1c5e93cdc1	h1:EAPsk8kfGCjxQagrkWjzXlUWe2p3gj5MknO+z2o9GKc=
	
	impl:	/Users/pantelis/go/bin/impl: go1.16
		path	github.com/josharian/impl
		mod	github.com/josharian/impl	v1.1.0	h1:gafhg1OFVMq46ifdkBa8wp4hlGogjktjjA5h/2j4+2k=
		dep	golang.org/x/mod	v0.2.0	h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
		dep	golang.org/x/tools	v0.0.0-20200522201501-cb1345f3a375	h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA=
		dep	golang.org/x/xerrors	v0.0.0-20191204190536-9bdfabe68543	h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
	
	goplay:	/Users/pantelis/go/bin/goplay: go1.16
		path	github.com/haya14busa/goplay/cmd/goplay
		mod	github.com/haya14busa/goplay	v1.0.0	h1:ED4BMrGQ3WH7H3YXrcnWMVzj1xeSepaYTkLh1DtFi/4=
		dep	github.com/skratchdot/open-golang	v0.0.0-20200116055534-eef842397966	h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
	
	dlv:	/Users/pantelis/go/bin/dlv: go1.16
		path	github.com/go-delve/delve/cmd/dlv
		mod	github.com/go-delve/delve	v1.7.1	h1:RJWK3sLJ/zY25ng6Q9oNsyo5Rmr2PAEWuyFoD1axlbg=
		dep	github.com/cosiner/argv	v0.1.0	h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
		dep	github.com/cpuguy83/go-md2man/v2	v2.0.0	h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
		dep	github.com/derekparker/trie	v0.0.0-20200317170641-1fdf38b7b0e9	h1:G765iDCq7bP5opdrPkXk+4V3yfkgV9iGFuheWZ/X/zY=
		dep	github.com/google/go-dap	v0.5.0	h1:RMHAVn5xeunBakYk65ggHXttk6qjZVdbmi+xhAoL2wY=
		dep	github.com/hashicorp/golang-lru	v0.5.4	h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
		dep	github.com/mattn/go-isatty	v0.0.3	h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
		dep	github.com/peterh/liner	v0.0.0-20170317030525-88609521dc4b	h1:8uaXtUkxiy+T/zdLWuxa/PG4so0TPZDZfafFNNSaptE=
		dep	github.com/russross/blackfriday/v2	v2.0.1	h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
		dep	github.com/shurcooL/sanitized_anchor_name	v1.0.0	h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
		dep	github.com/sirupsen/logrus	v1.6.0	h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
		dep	github.com/spf13/cobra	v1.1.3	h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
		dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
		dep	go.starlark.net	v0.0.0-20200821142938-949cc6f4b097	h1:YiRMXXgG+Pg26t1fjq+iAjaauKWMC9cmGFrtOEuwDDg=
		dep	golang.org/x/arch	v0.0.0-20190927153633-4e8777c89be4	h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI=
		dep	golang.org/x/sys	v0.0.0-20210514084401-e8d321eab015	h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
		dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
	
	dlv-dap:	/Users/pantelis/go/bin/dlv-dap: go1.16
		path	github.com/go-delve/delve/cmd/dlv
		mod	github.com/go-delve/delve	v1.7.1-0.20210804080032-f95340ae1bf9	h1:MNF+leMBsgJoT80cCoVJOsZWIJQlAOdTHgn0VslfJ6k=
		dep	github.com/cosiner/argv	v0.1.0	h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
		dep	github.com/cpuguy83/go-md2man/v2	v2.0.0	h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
		dep	github.com/google/go-dap	v0.5.0	h1:RMHAVn5xeunBakYk65ggHXttk6qjZVdbmi+xhAoL2wY=
		dep	github.com/hashicorp/golang-lru	v0.5.4	h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
		dep	github.com/mattn/go-isatty	v0.0.3	h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
		dep	github.com/peterh/liner	v0.0.0-20170317030525-88609521dc4b	h1:8uaXtUkxiy+T/zdLWuxa/PG4so0TPZDZfafFNNSaptE=
		dep	github.com/russross/blackfriday/v2	v2.0.1	h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
		dep	github.com/shurcooL/sanitized_anchor_name	v1.0.0	h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
		dep	github.com/sirupsen/logrus	v1.6.0	h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
		dep	github.com/spf13/cobra	v1.1.3	h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
		dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
		dep	go.starlark.net	v0.0.0-20200821142938-949cc6f4b097	h1:YiRMXXgG+Pg26t1fjq+iAjaauKWMC9cmGFrtOEuwDDg=
		dep	golang.org/x/arch	v0.0.0-20190927153633-4e8777c89be4	h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI=
		dep	golang.org/x/sys	v0.0.0-20210514084401-e8d321eab015	h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
		dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
	
	golangci-lint:	/Users/pantelis/go/bin/golangci-lint: go1.16
		path	github.com/golangci/golangci-lint/cmd/golangci-lint
		mod	github.com/golangci/golangci-lint	v1.42.0	h1:hqf1zo6zY3GKGjjBk3ttdH22tGwF6ZRpk6j6xyJmE8I=
		dep	4d63.com/gochecknoglobals	v0.0.0-20201008074935-acfc0b28355a	h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw=
		dep	github.com/Antonboom/errname	v0.1.3	h1:qKV8gSzPzBqrG/q0dgraZXJCymWt6KuD9+Y7K7xtzN8=
		dep	github.com/BurntSushi/toml	v0.4.1	h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
		dep	github.com/Djarvur/go-err113	v0.0.0-20210108212216-aea10b59be24	h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM=
		dep	github.com/Masterminds/semver	v1.5.0	h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
		dep	github.com/OpenPeeDeeP/depguard	v1.0.1	h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us=
		dep	github.com/alexkohler/prealloc	v1.0.0	h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw=
		dep	github.com/ashanbrown/forbidigo	v1.2.0	h1:RMlEFupPCxQ1IogYOQUnIQwGEUGK8g5vAPMRyJoSxbc=
		dep	github.com/ashanbrown/makezero	v0.0.0-20210520155254-b6261585ddde	h1:YOsoVXsZQPA9aOTy1g0lAJv5VzZUvwQuZqug8XPeqfM=
		dep	github.com/beorn7/perks	v1.0.1	h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
		dep	github.com/bkielbasa/cyclop	v1.2.0	h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A=
		dep	github.com/bombsimon/wsl/v3	v3.3.0	h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM=
		dep	github.com/cespare/xxhash/v2	v2.1.1	h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
		dep	github.com/charithe/durationcheck	v0.0.8	h1:cnZrThioNW9gSV5JsRIXmkyHUbcDH7Y9hkzFDVc9/j0=
		dep	github.com/chavacava/garif	v0.0.0-20210405164556-e8a0a408d6af	h1:spmv8nSH9h5oCQf40jt/ufBCt9j0/58u4G+rkeMqXGI=
		dep	github.com/daixiang0/gci	v0.2.9	h1:iwJvwQpBZmMg31w+QQ6jsyZ54KEATn6/nfARbBNW294=
		dep	github.com/davecgh/go-spew	v1.1.1	h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
		dep	github.com/denis-tingajkin/go-header	v0.4.2	h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218=
		dep	github.com/esimonov/ifshort	v1.0.2	h1:K5s1W2fGfkoWXsFlxBNqT6J0ZCncPaKrGM5qe0bni68=
		dep	github.com/ettle/strcase	v0.1.1	h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw=
		dep	github.com/fatih/color	v1.12.0	h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
		dep	github.com/fatih/structtag	v1.2.0	h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
		dep	github.com/fsnotify/fsnotify	v1.4.9	h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
		dep	github.com/fzipp/gocyclo	v0.3.1	h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc=
		dep	github.com/go-critic/go-critic	v0.5.6	h1:siUR1+322iVikWXoV75I1YRfNaC/yaLzhdF9Zwd8Tus=
		dep	github.com/go-toolsmith/astcast	v1.0.0	h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g=
		dep	github.com/go-toolsmith/astcopy	v1.0.0	h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8=
		dep	github.com/go-toolsmith/astequal	v1.0.0	h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ=
		dep	github.com/go-toolsmith/astfmt	v1.0.0	h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k=
		dep	github.com/go-toolsmith/astp	v1.0.0	h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg=
		dep	github.com/go-toolsmith/strparse	v1.0.0	h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4=
		dep	github.com/go-toolsmith/typep	v1.0.2	h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk=
		dep	github.com/go-xmlfmt/xmlfmt	v0.0.0-20191208150333-d5b6f63a941b	h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo=
		dep	github.com/gobwas/glob	v0.2.3	h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
		dep	github.com/gofrs/flock	v0.8.1	h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
		dep	github.com/golang/protobuf	v1.5.2	h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
		dep	github.com/golangci/check	v0.0.0-20180506172741-cfe4005ccda2	h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=
		dep	github.com/golangci/dupl	v0.0.0-20180902072040-3e9179ac440a	h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=
		dep	github.com/golangci/go-misc	v0.0.0-20180628070357-927a3d87b613	h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=
		dep	github.com/golangci/gofmt	v0.0.0-20190930125516-244bba706f1a	h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks=
		dep	github.com/golangci/lint-1	v0.0.0-20191013205115-297bf364a8e0	h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA=
		dep	github.com/golangci/maligned	v0.0.0-20180506175553-b1d89398deca	h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA=
		dep	github.com/golangci/misspell	v0.3.5	h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo=
		dep	github.com/golangci/revgrep	v0.0.0-20210208091834-cd28932614b5	h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc=
		dep	github.com/golangci/unconvert	v0.0.0-20180507085042-28b1c447d1f4	h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=
		dep	github.com/google/go-cmp	v0.5.5	h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
		dep	github.com/gordonklaus/ineffassign	v0.0.0-20210225214923-2e10b2664254	h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI=
		dep	github.com/gostaticanalysis/analysisutil	v0.4.1	h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8=
		dep	github.com/gostaticanalysis/comment	v1.4.1	h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc=
		dep	github.com/gostaticanalysis/forcetypeassert	v0.0.0-20200621232751-01d4955beaa5	h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY=
		dep	github.com/gostaticanalysis/nilerr	v0.1.1	h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk=
		dep	github.com/hashicorp/errwrap	v1.0.0	h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
		dep	github.com/hashicorp/go-multierror	v1.1.1	h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
		dep	github.com/hashicorp/hcl	v1.0.0	h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
		dep	github.com/jgautheron/goconst	v1.5.1	h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM=
		dep	github.com/jingyugao/rowserrcheck	v1.1.0	h1:u6h4eiNuCLqk73Ic5TXQq9yZS+uEXTdusn7c3w1Mr6A=
		dep	github.com/jirfag/go-printf-func-name	v0.0.0-20200119135958-7558a9eaa5af	h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48=
		dep	github.com/julz/importas	v0.0.0-20210419104244-841f0c0fe66d	h1:XeSMXURZPtUffuWAaq90o6kLgZdgu+QA8wk4MPC8ikI=
		dep	github.com/kisielk/errcheck	v1.6.0	h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY=
		dep	github.com/kisielk/gotool	v1.0.0	h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
		dep	github.com/kulti/thelper	v0.4.0	h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM=
		dep	github.com/kunwardeep/paralleltest	v1.0.2	h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU=
		dep	github.com/kyoh86/exportloopref	v0.1.8	h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M=
		dep	github.com/ldez/gomoddirectives	v0.2.2	h1:p9/sXuNFArS2RLc+UpYZSI4KQwGMEDWC/LbtF5OPFVg=
		dep	github.com/ldez/tagliatelle	v0.2.0	h1:693V8Bf1NdShJ8eu/s84QySA0J2VWBanVBa2WwXD/Wk=
		dep	github.com/magiconair/properties	v1.8.5	h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
		dep	github.com/maratori/testpackage	v1.0.1	h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ=
		dep	github.com/matoous/godox	v0.0.0-20210227103229-6504466cf951	h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA=
		dep	github.com/mattn/go-colorable	v0.1.8	h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
		dep	github.com/mattn/go-isatty	v0.0.12	h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
		dep	github.com/mattn/go-runewidth	v0.0.9	h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
		dep	github.com/matttproud/golang_protobuf_extensions	v1.0.1	h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
		dep	github.com/mbilski/exhaustivestruct	v1.2.0	h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo=
		dep	github.com/mgechev/dots	v0.0.0-20190921121421-c36f7dcfbb81	h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM=
		dep	github.com/mgechev/revive	v1.1.0	h1:TvabpsolbtlzZTyJcgMRN38MHrgi8C0DhmGE5dhscGY=
		dep	github.com/mitchellh/go-homedir	v1.1.0	h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
		dep	github.com/mitchellh/mapstructure	v1.4.1	h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
		dep	github.com/moricho/tparallel	v0.2.1	h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4=
		dep	github.com/nakabonne/nestif	v0.3.0	h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw=
		dep	github.com/nbutton23/zxcvbn-go	v0.0.0-20210217022336-fa2cb2858354	h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA=
		dep	github.com/nishanths/exhaustive	v0.2.3	h1:+ANTMqRNrqwInnP9aszg/0jDo+zbXa4x66U19Bx/oTk=
		dep	github.com/nishanths/predeclared	v0.2.1	h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw=
		dep	github.com/olekukonko/tablewriter	v0.0.5	h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
		dep	github.com/pelletier/go-toml	v1.9.3	h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
		dep	github.com/phayes/checkstyle	v0.0.0-20170904204023-bfd46e6a821d	h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA=
		dep	github.com/pkg/errors	v0.9.1	h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
		dep	github.com/pmezard/go-difflib	v1.0.0	h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
		dep	github.com/polyfloyd/go-errorlint	v0.0.0-20210510181950-ab96adb96fea	h1:Sk6Xawg57ZkjXmFYD1xCHSKN6FtYM+km51MM7Lveyyc=
		dep	github.com/prometheus/client_golang	v1.7.1	h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA=
		dep	github.com/prometheus/client_model	v0.2.0	h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
		dep	github.com/prometheus/common	v0.10.0	h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
		dep	github.com/prometheus/procfs	v0.6.0	h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
		dep	github.com/quasilyte/go-ruleguard	v0.3.4	h1:F6l5p6+7WBcTKS7foNQ4wqA39zjn2+RbdbyzGxIq1B0=
		dep	github.com/quasilyte/regex/syntax	v0.0.0-20200407221936-30656e2c4a95	h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY=
		dep	github.com/ryancurrah/gomodguard	v1.2.3	h1:ww2fsjqocGCAFamzvv/b8IsRduuHHeK2MHTcTxZTQX8=
		dep	github.com/ryanrolds/sqlclosecheck	v0.3.0	h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw=
		dep	github.com/sanposhiho/wastedassign/v2	v2.0.6	h1:+6/hQIHKNJAUixEj6EmOngGIisyeI+T3335lYTyxRoA=
		dep	github.com/securego/gosec/v2	v2.8.1	h1:Tyy/nsH39TYCOkqf5HAgRE+7B5D8sHDwPdXRgFWokh8=
		dep	github.com/shazow/go-diff	v0.0.0-20160112020656-b6b7b6733b8c	h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU=
		dep	github.com/sirupsen/logrus	v1.8.1	h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
		dep	github.com/sonatard/noctx	v0.0.1	h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY=
		dep	github.com/sourcegraph/go-diff	v0.6.1	h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ=
		dep	github.com/spf13/afero	v1.6.0	h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
		dep	github.com/spf13/cast	v1.3.1	h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
		dep	github.com/spf13/cobra	v1.2.1	h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
		dep	github.com/spf13/jwalterweatherman	v1.1.0	h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
		dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
		dep	github.com/spf13/viper	v1.8.1	h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44=
		dep	github.com/ssgreg/nlreturn/v2	v2.1.0	h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA=
		dep	github.com/stretchr/objx	v0.1.1	h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
		dep	github.com/stretchr/testify	v1.7.0	h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
		dep	github.com/subosito/gotenv	v1.2.0	h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
		dep	github.com/tdakkota/asciicheck	v0.0.0-20200416200610-e657995f937b	h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U=
		dep	github.com/tetafro/godot	v1.4.8	h1:rhuUH+tBrx24yVAr6Ox3/UxcsiUPPJcGhinfLdbdew0=
		dep	github.com/timakin/bodyclose	v0.0.0-20200424151742-cb6215831a94	h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8=
		dep	github.com/tomarrell/wrapcheck/v2	v2.3.0	h1:i3DNjtyyL1xwaBQOsPPk8LAcpayWfQv2rxNi9b/eEx4=
		dep	github.com/tommy-muehle/go-mnd/v2	v2.4.0	h1:1t0f8Uiaq+fqKteUR4N9Umr6E99R+lDnLnq7PwX2PPE=
		dep	github.com/ultraware/funlen	v0.0.3	h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA=
		dep	github.com/ultraware/whitespace	v0.0.4	h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg=
		dep	github.com/uudashr/gocognit	v1.0.5	h1:rrSex7oHr3/pPLQ0xoWq108XMU8s678FJcQ+aSfOHa4=
		dep	github.com/yeya24/promlinter	v0.1.0	h1:goWULN0jH5Yajmu/K+v1xCqIREeB+48OiJ2uu2ssc7U=
		dep	golang.org/x/mod	v0.4.2	h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
		dep	golang.org/x/sys	v0.0.0-20210630005230-0f9fa26af87c	h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
		dep	golang.org/x/text	v0.3.6	h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
		dep	golang.org/x/tools	v0.1.5	h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA=
		dep	golang.org/x/xerrors	v0.0.0-20200804184101-5ec99f83aff1	h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
		dep	google.golang.org/protobuf	v1.26.0	h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
		dep	gopkg.in/ini.v1	v1.62.0	h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
		dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
		dep	gopkg.in/yaml.v3	v3.0.0-20210107192922-496545a6307b	h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
		dep	honnef.co/go/tools	v0.2.1	h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY=
		dep	mvdan.cc/gofumpt	v0.1.1	h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
		dep	mvdan.cc/interfacer	v0.0.0-20180901003855-c20040233aed	h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I=
		dep	mvdan.cc/lint	v0.0.0-20170908181259-adc824a0674b	h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo=
		dep	mvdan.cc/unparam	v0.0.0-20210104141923-aac4ce9116a7	h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU=
	
	gopls:	/Users/pantelis/go/bin/gopls: go1.16
		path	golang.org/x/tools/gopls
		mod	golang.org/x/tools/gopls	v0.7.1	h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=
		dep	github.com/BurntSushi/toml	v0.3.1	h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
		dep	github.com/google/go-cmp	v0.5.5	h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
		dep	github.com/sergi/go-diff	v1.1.0	h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
		dep	golang.org/x/mod	v0.4.2	h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
		dep	golang.org/x/sync	v0.0.0-20210220032951-036812b2e83c	h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
		dep	golang.org/x/sys	v0.0.0-20210510120138-977fb7262007	h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
		dep	golang.org/x/tools	v0.1.6-0.20210802203754-9b21a8868e16	h1:ZC/gVBZl8poJyKzWLxxlsmhayVGosF4mohR35szD5Bg=
		dep	golang.org/x/xerrors	v0.0.0-20200804184101-5ec99f83aff1	h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
		dep	honnef.co/go/tools	v0.2.0	h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
		dep	mvdan.cc/gofumpt	v0.1.1	h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
		dep	mvdan.cc/xurls/v2	v2.2.0	h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
	

go env
Workspace Folder (eck-user-mgmt): /Users/pantelis/Workspace/systems-utils/eck-user-mgmt
	GO111MODULE=""
	GOARCH="amd64"
	GOBIN=""
	GOCACHE="/Users/pantelis/Library/Caches/go-build"
	GOENV="/Users/pantelis/Library/Application Support/go/env"
	GOEXE=""
	GOFLAGS=""
	GOHOSTARCH="amd64"
	GOHOSTOS="darwin"
	GOINSECURE=""
	GOMODCACHE="/Users/pantelis/go/pkg/mod"
	GONOPROXY=""
	GONOSUMDB=""
	GOOS="darwin"
	GOPATH="/Users/pantelis/go"
	GOPRIVATE=""
	GOPROXY="https://proxy.golang.org,direct"
	GOROOT="/usr/local/go"
	GOSUMDB="sum.golang.org"
	GOTMPDIR=""
	GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
	GOVCS=""
	GOVERSION="go1.16"
	GCCGO="gccgo"
	AR="ar"
	CC="clang"
	CXX="clang++"
	CGO_ENABLED="1"
	GOMOD="/Users/pantelis/Workspace/systems-utils/eck-user-mgmt/go.mod"
	CGO_CFLAGS="-g -O2"
	CGO_CPPFLAGS=""
	CGO_CXXFLAGS="-g -O2"
	CGO_FFLAGS="-g -O2"
	CGO_LDFLAGS="-g -O2"
	PKG_CONFIG="pkg-config"
	GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/x2/44cfcmn95c76ggvpnwpw5dg00000gn/T/go-build4290844666=/tmp/go-build -gno-record-gcc-switches -fno-common"
@gopherbot gopherbot added this to the Untriaged milestone Aug 18, 2021
@suzmue
Copy link
Contributor

suzmue commented Aug 19, 2021

@pantelis-karamolegkos Thanks for filing an issue!

It looks like there may be two debug servers running, the API Server listening message comes from an rpc server and the DAP server pid message comes from a dap server.

Could you share the client side debug output as well (Command Palette -> "View: Toggle Output" -> Select "Go Debug" from the dropdown menu)? If you could include the launch request as well that would be super helpful, though I understand it may need to be sanitized to do so.

@suzmue suzmue added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. Debug Issues related to the debugging functionality of the extension. labels Aug 19, 2021
@pantelis-karamolegkos
Copy link
Author

@suzmue if you mean the Output in the attached screenshot, it is empty.

Also, if by "launch request" you mean the launch.json contents, here they are

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceRoot}",
                "env": {
                    "ES_RSVD_USER_DATADOG_ROLES": "admin",
                    "ES_RSVD_USER_DATADOG_PASSWORD": "supersecret",
                    "ES_RSVD_USER_ATS_ROLES": "readonly",
                    "ES_RSVD_USER_ATS_PASSWORD": "easytoguess",
                    "ES_RSVD_USER_CAMPAIGNS_ROLES": "readonly,apm_admin",
                    "ES_RSVD_USER_CAMPAIGNS_PASSWORD": "easytoguess",
                    "ES_CLUSTER_NAME":"workablestg9",
                },
        },
            {
                "name": "Test",
                "type": "go",
                "request": "launch",
                "mode": "test",
                "program": "${workspaceRoot}",
                "env": {
                    "ES_RSVD_USER_DATADOG_ROLES": "admin",
                    "ES_RSVD_USER_DATADOG_PASSWORD": "supersecretpassword",
                    "ES_RSVD_USER_JFROG_WRONG_1": "doesnotmatter_1",
                    "ES_RSVD_USER_JFROG_WRONG_2": "doesnotmatter_2",
                },
                "trace": "verbose",
                "showLog": true,
                "logOutput": "dap",
            }
    ]
}

Screenshot 2021-08-20 at 8 12 58 PM

@suzmue
Copy link
Contributor

suzmue commented Aug 20, 2021

@suzmue if you mean the Output in the attached screenshot, it is empty.

Could you make sure that Go Debug is the selected output channel? With "trace": "verbose" there should be logging there.

Screen Shot 2021-08-20 at 12 00 33 PM

Also, if by "launch request" you mean the launch.json contents, here they are

In the debug output it looks like there are a couple of lines which were removed. Specifically the launch request appears to be missing. It should look like:

2021-08-18T19:31:35+03:00 debug layer=dap [<- from client]{"seq":2,"type":"request","command":"launch", ...

@pantelis-karamolegkos
Copy link
Author

OK I see what you mean. Yes there is logging but that's a lot of stuff to sanitise ... :(

I will try to find the time to post the info.

@nanomoeamezao
Copy link

nanomoeamezao commented Aug 22, 2021

Same problem here, if you dont mind me hijacking the response - here is the verbose log from the debugger with my comments:

##### ctrl-f5
Starting: E:\codes\go\bin\dlv-dap.exe dap --listen=127.0.0.1:64729 --log=true --log-output=dap
DAP server listening at: 127.0.0.1:64729
2021-08-22T15:21:01+03:00 debug layer=dap DAP server pid = 14676
2021-08-22T15:21:01+03:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","locale":"ru","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true}}
2021-08-22T15:21:01+03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":true,"supportsClipboardContext":true}}
2021-08-22T15:21:01+03:00 debug layer=dap [<- from client]{"seq":2,"type":"request","command":"launch","arguments":{"__configurationTarget":5,"__sessionId":"0b53c4a3-c8b0-4dce-a05c-ce9ac6a90c7d","apiVersion":2,"debugAdapter":"dlv-dap","dlvLoadConfig":{"followPointers":true,"maxArrayValues":64,"maxStringLen":64,"maxStructFields":-1,"maxVariableRecurse":1},"dlvToolPath":"E:\\codes\\go\\bin\\dlv-dap.exe","env":{"ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\neo\\AppData\\Roaming","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","CHROME_CRASHPAD_PIPE_NAME":"\\\\.\\pipe\\crashpad_19584_BCJGLSAINLHTCMEC","COMPUTERNAME":"NEOPC","ChocolateyInstall":"C:\\ProgramData\\chocolatey","ChocolateyLastPathUpdate":"132702516447584932","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","ELECTRON_RUN_AS_NODE":"1","GOMODCACHE":"E:\\codes\\go\\pkg\\mod","GOPATH":"E:\\codes\\go","GOPROXY":"https://proxy.golang.org,direct","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\neo","JD2_HOME":"C:\\Users\\neo\\AppData\\Local\\JDownloader 2.0","LOCALAPPDATA":"C:\\Users\\neo\\AppData\\Local","LOGONSERVER":"\\\\NEOPC","NUMBER_OF_PROCESSORS":"8","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","OneDrive":"C:\\Users\\neo\\OneDrive","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","POWERSHELL_DISTRIBUTION_CHANNEL":"MSI:Windows 10 Pro for Workstations","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 94 Stepping 3, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"5e03","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","Path":"C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\nodejs\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files (x86)\\Streamlink\\bin;C:\\Program Files\\Go\\bin;C:\\Program Files\\WireGuard\\;C:\\Users\\neo\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\neo\\AppData\\Roaming\\npm;C:\\Users\\neo\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Python39\\Scripts;C:\\Users\\neo\\go\\bin;C:\\Python39;","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\WINDOWS","TEMP":"C:\\Users\\neo\\AppData\\Local\\Temp","TMP":"C:\\Users\\neo\\AppData\\Local\\Temp","USERDOMAIN":"###","USERDOMAIN_ROAMINGPROFILE":"###","USERNAME":"###","USERPROFILE":"C:\\Users\\###","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_CODE_CACHE_PATH":"C:\\Users\\neo\\AppData\\Roaming\\Code\\CachedData\\3866c3553be8b268c8a7f8c0482c0c0177aa8bfa","VSCODE_CWD":"C:\\Users\\neo\\AppData\\Local\\Programs\\Microsoft VS Code","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"\\\\.\\pipe\\1633a64746b457404fbb9710a368b824-1.59.1-main-sock","VSCODE_IPC_HOOK_EXTHOST":"\\\\.\\pipe\\vscode-ipc-b2a62b3d-8731-4f15-9981-a5b8f29cd13b-sock","VSCODE_LOG_NATIVE":"false","VSCODE_LOG_STACK":"false","VSCODE_NLS_CONFIG":"{\"locale\":\"ru\",\"availableLanguages\":{\"*\":\"ru\"},\"_languagePackId\":\"84c6aaced401bf790bef055826072288.ru\",\"_translationsConfigFile\":\"C:\\\\Users\\\\neo\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\84c6aaced401bf790bef055826072288.ru\\\\tcf.json\",\"_cacheRoot\":\"C:\\\\Users\\\\neo\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\84c6aaced401bf790bef055826072288.ru\",\"_resolvedLanguagePackCoreLocation\":\"C:\\\\Users\\\\neo\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\84c6aaced401bf790bef055826072288.ru\\\\3866c3553be8b268c8a7f8c0482c0c0177aa8bfa\",\"_corruptedFile\":\"C:\\\\Users\\\\neo\\\\AppData\\\\Roaming\\\\Code\\\\clp\\\\84c6aaced401bf790bef055826072288.ru\\\\corrupted.info\",\"_languagePackSupport\":true}","VSCODE_PID":"19584","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","windir":"C:\\WINDOWS"},"logOutput":"dap","mode":"debug","name":"Launch Package","noDebug":true,"packagePathToGoModPathMap":{"e:\\codes\\go\\src\\notification_service":"e:\\codes\\go\\src\\notification_service"},"program":"E:\\codes\\go\\src\\notification_service","request":"launch","showGlobalVariables":false,"showLog":true,"substitutePath":[],"trace":"verbose","type":"go"}}
2021-08-22T15:21:01+03:00 debug layer=dap debug backend is 'default'
2021-08-22T15:21:01+03:00 debug layer=dap building binary 'E:\codes\go\src\notification_service\__debug_bin.exe' from 'E:\codes\go\src\notification_service' with flags ''
2021-08-22T15:21:02+03:00 debug layer=dap running program in E:\codes\go\src\notification_service
##### requested line
2021-08-22T15:21:02+03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
##### output of my code:
listening
##### end of output; stopping the debug
##### ctrl -f5; old process is not killed, __debug_bin.exe is present
2021/08/22 15:21:03 ListenAndServe: listen tcp :80: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
##### my code fails to start because another instance is running on port 80
2021-08-22T15:21:03+03:00 debug layer=dap program exited with error: exit status 1
Process 18504 has exited with status 1
2021-08-22T15:21:03+03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 18504 has exited with status 1\n","source":{}}}
2021-08-22T15:21:03+03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}}
2021-08-22T15:21:03+03:00 debug layer=dap [<- from client]{"seq":3,"type":"request","command":"disconnect","arguments":{}}
2021-08-22T15:21:03+03:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":3,"success":true,"command":"disconnect"}
2021-08-22T15:21:03+03:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}}
2021-08-22T15:21:03+03:00 debug layer=dap DAP server stopping...
could not remove E:\codes\go\src\notification_service\__debug_bin.exe: remove E:\codes\go\src\notification_service\__debug_bin.exe: Access is denied.
2021-08-22T15:21:03+03:00 debug layer=dap DAP server stopped
dlv dap (14676) exited with code: 0

my launch settings:

{
    "version": "0.2.0",
    "configurations": [
    {
        "name": "Launch Package",
        "type": "go",
        "request": "launch",
        "mode": "debug",
        "program": "${workspaceFolder}",
        "trace": "verbose",
        "showLog": true,
        "logOutput": "dap",
    }
    ]
}

System: win10

@polinasok
Copy link
Contributor

@pantelis-karamolegkos Are you still experiencing this problem? Unfortunately, I am unable to reproduce it. The logs that you posted seem rearranged in an on odd way, so I am wondering if you accidentally combined the logs from two different runs. Could you also please use "logOutput": "dap,debugger", so we also see the log from the debugger backend, which is where the binary is started.

(omitted the line with the env vars, containing sensitive info and was too large to filter out appropriately)

Does this reproduce without the sensitive variables that complicate the logs?

Yes there is logging but that's a lot of stuff to sanitise

Unlike Debug Console that is refreshed for every session,Go Debug channel accumulates logging from all sessions. You can clear it with this button before thee run where you want to inspect the log.
image

@polinasok
Copy link
Contributor

@neozumm The original issue refers to inability to start up the binary (could not launch process: open /.../__debug_bin: no such file or directory) when using test mode. Looks like your issue is with the removal of the binary at the end of the session - could not remove E:\codes\go\src\notification_service\__debug_bin.exe: Access is denied. Does this prevent you from running subsequent sessions?

This is a known issue on Windows due to how resources are released by the underlying systems. There is already a delay in the delve code to address this, but looks like it might not always be enough:
https://github.com/go-delve/delve/blob/dc2f615c9a2b73e500bd335e8e0bd4c1619c7858/pkg/gobuild/gobuild.go#L21-L29. Please file an issue at https://github.com/go-delve/delve/issues if the problem persists.

@pantelis-karamolegkos
Copy link
Author

Since I am still experiencing this issue, would removing / reinstalling the utility performing the debug be an option?

/Users/pantelis/go/bin/dlv:

I assume this is it? What is the recommended way of re-installing it?

@pantelis-karamolegkos
Copy link
Author

pantelis-karamolegkos commented Nov 18, 2021

At least I have managed to change the error message...

This launch.json configuration works just fine

            {
                "name": "Test",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "program": "${workspaceRoot}",
                "env": {
                    "VAR1": "foo",
                    "VAR2": "bar",
                    "VAR3": "doesnotmatter_1",
                    "VAR3": "doesnotmatter_2",
                },
                "trace": "verbose",
                "showLog": true,
                "logOutput": "dap",
            }

This fails (notice that the only change is on the mode, from debug to test)

            {
                "name": "Test",
                "type": "go",
                "request": "launch",
                "mode": "test",
                "program": "${workspaceRoot}",
                "env": {
                    "VAR1": "foo",
                    "VAR2": "bar",
                    "VAR3": "doesnotmatter_1",
                    "VAR3": "doesnotmatter_2",
                },
                "trace": "verbose",
                "showLog": true,
                "logOutput": "dap",
            }

Screenshot 2021-11-18 at 7 13 44 PM

trace logs

2021-11-18T19:15:43+02:00 debug layer=dap Failed to launch: could not launch process: not an executable file
2021-11-18T19:15:43+02:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":false,"command":"launch","message":"Failed to launch","body":{"error":{"id":3000,"format":"Failed to launch: could not launch process: not an executable file","showUser":true}}}

@suzmue
Copy link
Contributor

suzmue commented Nov 18, 2021

@pantelis-karamolegkos I am able to reproduce this error message by attempting to launch a debug session for a folder that has no tests. Are there any test files in your workspace root?

This error message is definitely very unclear so that needs to be improved.

@pantelis-karamolegkos
Copy link
Author

pantelis-karamolegkos commented Nov 18, 2021

I assume the value of "${workspaceRoot}" is the (what else?) root of my project, right?

If so, no, there aren't.

What value should I use for program then? (and what happens when we have multiple dirs with go tests? do we need a separate launch.json config for each one of them?)

Thanks.

@suzmue
Copy link
Contributor

suzmue commented Nov 18, 2021

The debugger is not currently able to handle running multiple test packages, because it is expecting to build and launch a single package.

If you want a single launch configuration to run the tests in the directory of the file you currently have open, you can use:

{
                "name": "Test",
                "type": "go",
                "request": "launch",
                "mode": "test",
                "program": "${fileDirname}",
            }

If you are just looking to run all of the tests in your package, I would recommend using the Test Explorer, using the commands Go: Test Package and Go: Test All Packages In Workspace or creating a Task to run the desired tests.

@pantelis-karamolegkos
Copy link
Author

pantelis-karamolegkos commented Nov 18, 2021

update: All ok now :)

Many thanks for the support 👍🏻

@golang golang locked and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants