Skip to content
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

debug: noDebug mode & integratedTerminal mode tests are broken with delve v1.21.1 #2999

Closed
hyangah opened this issue Oct 5, 2023 · 4 comments
Labels
FrozenDueToAge release-blocker must be fixed before the next release.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Oct 5, 2023

https://github.com/golang/vscode-go/actions/runs/6405099820/job/17386972981

test failure logs
1) should run program with cwd set (noDebug)
should run program with cwd set (noDebug) FAILED: DAP Trace
>> accepted connection from client
-> server: {"type":"request","seq":1,"command":"initialize","arguments":{"adapterID":"go","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Starting: /home/runner/go/bin/dlv dap --log=true --log-output=dap,debugger --listen=127.0.0.1:39791 --log-dest=3 from /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"DAP server listening at: 127.0.0.1:39791\n2023-10-04T11:07:48Z debug layer=dap DAP server pid = 13084\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap DAP connection 1 started\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap [<- from client]{\"seq\":1,\"type\":\"request\",\"command\":\"initialize\",\"arguments\":{\"adapterID\":\"go\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\"}}\n2023-10-04T11:07:48Z 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,\"supportsDelayedStackTraceLoading\":true,\"supportsLogPoints\":true,\"supportsDisassembleRequest\":true,\"supportsClipboardContext\":true,\"supportsSteppingGranularity\":true,\"supportsInstructionBreakpoints\":true}}\n"}}
<- server: {"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
-> server: {"type":"request","seq":2,"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":".","cwd":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest","noDebug":true,"debugAdapter":"dlv-dap","logOutput":"dap,debugger","showLog":true,"trace":"verbose","output":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19","packagePathToGoModPathMap":{"/home/runner/go/src/test/testfixture":"/home/runner/go/src/test/testfixture","/home/runner/go/src/test/testfixture/baseTest":"","/home/runner/go/src/test/testfixture/gogetdocTestData":"","/home/runner/go/src/test/testfixture/completions":"","/home/runner/go/src/test/testfixture/testTags":"","/tmp/legacyI1qz3c/testfixture/baseTest":"/tmp/legacyI1qz3c/testfixture/baseTest","/tmp/legacyI1qz3c/testfixture/completions":"/tmp/legacyI1qz3c/testfixture/completions","/tmp/legacyI1qz3c/testfixture/testTags":"/tmp/legacyI1qz3c/testfixture/testTags"},"showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/runner/go/bin/dlv","env":{"GOPATH":"/home/runner/go"},"__buildDir":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap [<- from client]{\"seq\":2,\"type\":\"request\",\"command\":\"launch\",\"arguments\":{\"name\":\"Launch\",\"type\":\"go\",\"request\":\"launch\",\"mode\":\"debug\",\"program\":\".\",\"cwd\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\"noDebug\":true,\"debugAdapter\":\"dlv-dap\",\"logOutput\":\"dap,debugger\",\"showLog\":true,\"trace\":\"verbose\",\"output\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19\",\"packagePathToGoModPathMap\":{\"/home/runner/go/src/test/testfixture\":\"/home/runner/go/src/test/testfixture\",\"/home/runner/go/src/test/testfixture/baseTest\":\"\",\"/home/runner/go/src/test/testfixture/gogetdocTestData\":\"\",\"/home/runner/go/src/test/testfixture/completions\":\"\",\"/home/runner/go/src/test/testfixture/testTags\":\"\",\"/tmp/legacyI1qz3c/testfixture/baseTest\":\"/tmp/legacyI1qz3c/testfixture/baseTest\",\"/tmp/legacyI1qz3c/testfixture/completions\":\"/tmp/legacyI1qz3c/testfixture/completions\",\"/tmp/legacyI1qz3c/testfixture/testTags\":\"/tmp/legacyI1qz3c/testfixture/testTags\"},\"showRegisters\":false,\"showGlobalVariables\":false,\"substitutePath\":[],\"dlvFlags\":[],\"hideSystemGoroutines\":false,\"dlvToolPath\":\"/home/runner/go/bin/dlv\",\"env\":{\"GOPATH\":\"/home/runner/go\"},\"__buildDir\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\"}}\n2023-10-04T11:07:48Z debug layer=dap parsed launch config: {\n\t\"mode\": \"debug\",\n\t\"program\": \".\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19\",\n\t\"noDebug\": true,\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap building from \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\": [go build -o /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19 -gcflags all=-N -l .]\n2023-10-04T11:07:48Z debug layer=dap launching binary '/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19' with config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_19\",\n\t\"noDebug\": true,\n\t\"dlvCwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"success\":true,\"command\":\"launch\"}\n"}}
<- server: {"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:07:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"console\",\"output\":\"Process 13125 has exited with status 0\\n\"}}\n2023-10-04T11:07:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 13125 has exited with status 0\n"}}
<- server: {"seq":0,"type":"event","event":"terminated","body":{}}
      2) should run program without cwd set (noDebug)
should run program without cwd set (noDebug) FAILED: DAP Trace
>> accepted connection from client
-> server: {"type":"request","seq":1,"command":"initialize","arguments":{"adapterID":"go","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Starting: /home/runner/go/bin/dlv dap --log=true --log-output=dap,debugger --listen=127.0.0.1:43653 --log-dest=3 from /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"DAP server listening at: 127.0.0.1:43653\n2023-10-04T11:08:48Z debug layer=dap DAP server pid = 1[315](https://github.com/golang/vscode-go/actions/runs/6405099820/job/17386972981#step:9:316)0\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap DAP connection 1 started\n2023-10-04T11:08:48Z debug layer=dap [<- from client]{\"seq\":1,\"type\":\"request\",\"command\":\"initialize\",\"arguments\":{\"adapterID\":\"go\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\"}}\n2023-10-04T11:08:48Z 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,\"supportsDelayedStackTraceLoading\":true,\"supportsLogPoints\":true,\"supportsDisassembleRequest\":true,\"supportsClipboardContext\":true,\"supportsSteppingGranularity\":true,\"supportsInstructionBreakpoints\":true}}\n"}}
<- server: {"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
-> server: {"type":"request","seq":2,"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":".","noDebug":true,"debugAdapter":"dlv-dap","logOutput":"dap,debugger","showLog":true,"trace":"verbose","output":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20","packagePathToGoModPathMap":{"/home/runner/go/src/test/testfixture":"/home/runner/go/src/test/testfixture","/home/runner/go/src/test/testfixture/baseTest":"","/home/runner/go/src/test/testfixture/gogetdocTestData":"","/home/runner/go/src/test/testfixture/completions":"","/home/runner/go/src/test/testfixture/testTags":"","/tmp/legacyI1qz3c/testfixture/baseTest":"/tmp/legacyI1qz3c/testfixture/baseTest","/tmp/legacyI1qz3c/testfixture/completions":"/tmp/legacyI1qz3c/testfixture/completions","/tmp/legacyI1qz3c/testfixture/testTags":"/tmp/legacyI1qz3c/testfixture/testTags"},"showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/runner/go/bin/dlv","env":{"GOPATH":"/home/runner/go"},"__buildDir":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap [<- from client]{\"seq\":2,\"type\":\"request\",\"command\":\"launch\",\"arguments\":{\"name\":\"Launch\",\"type\":\"go\",\"request\":\"launch\",\"mode\":\"debug\",\"program\":\".\",\"noDebug\":true,\"debugAdapter\":\"dlv-dap\",\"logOutput\":\"dap,debugger\",\"showLog\":true,\"trace\":\"verbose\",\"output\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20\",\"packagePathToGoModPathMap\":{\"/home/runner/go/src/test/testfixture\":\"/home/runner/go/src/test/testfixture\",\"/home/runner/go/src/test/testfixture/baseTest\":\"\",\"/home/runner/go/src/test/testfixture/gogetdocTestData\":\"\",\"/home/runner/go/src/test/testfixture/completions\":\"\",\"/home/runner/go/src/test/testfixture/testTags\":\"\",\"/tmp/legacyI1qz3c/testfixture/baseTest\":\"/tmp/legacyI1qz3c/testfixture/baseTest\",\"/tmp/legacyI1qz3c/testfixture/completions\":\"/tmp/legacyI1qz3c/testfixture/completions\",\"/tmp/legacyI1qz3c/testfixture/testTags\":\"/tmp/legacyI1qz3c/testfixture/testTags\"},\"showRegisters\":false,\"showGlobalVariables\":false,\"substitutePath\":[],\"dlvFlags\":[],\"hideSystemGoroutines\":false,\"dlvToolPath\":\"/home/runner/go/bin/dlv\",\"env\":{\"GOPATH\":\"/home/runner/go\"},\"__buildDir\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap parsed launch config: {\n\t\"mode\": \"debug\",\n\t\"program\": \".\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20\",\n\t\"noDebug\": true,\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap building from \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\": [go build -o /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20 -gcflags all=-N -l .]\n2023-10-04T11:08:48Z debug layer=dap launching binary '/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20' with config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_20\",\n\t\"noDebug\": true,\n\t\"dlvCwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"success\":true,\"command\":\"launch\"}\n"}}
<- server: {"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"console\",\"output\":\"Process 13192 has exited with status 0\\n\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 13192 has exited with status 0\n"}}
<- server: {"seq":0,"type":"event","event":"terminated","body":{}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:08:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n"}}
      3) should run file program with cwd set (noDebug)
should run file program with cwd set (noDebug) FAILED: DAP Trace
>> accepted connection from client
-> server: {"type":"request","seq":1,"command":"initialize","arguments":{"adapterID":"go","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Starting: /home/runner/go/bin/dlv dap --log=true --log-output=dap,debugger --listen=127.0.0.1:34761 --log-dest=3 from /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"DAP server listening at: 127.0.0.1:34761\n2023-10-04T11:09:48Z debug layer=dap DAP server pid = 13275\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap DAP connection 1 started\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap [<- from client]{\"seq\":1,\"type\":\"request\",\"command\":\"initialize\",\"arguments\":{\"adapterID\":\"go\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z 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,\"supportsDelayedStackTraceLoading\":true,\"supportsLogPoints\":true,\"supportsDisassembleRequest\":true,\"supportsClipboardContext\":true,\"supportsSteppingGranularity\":true,\"supportsInstructionBreakpoints\":true}}\n"}}
<- server: {"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
-> server: {"type":"request","seq":2,"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":"./main.go","cwd":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest","noDebug":true,"debugAdapter":"dlv-dap","logOutput":"dap,debugger","showLog":true,"trace":"verbose","output":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21","packagePathToGoModPathMap":{"/home/runner/go/src/test/testfixture":"/home/runner/go/src/test/testfixture","/home/runner/go/src/test/testfixture/baseTest":"","/home/runner/go/src/test/testfixture/gogetdocTestData":"","/home/runner/go/src/test/testfixture/completions":"","/home/runner/go/src/test/testfixture/testTags":"","/tmp/legacyI1qz3c/testfixture/baseTest":"/tmp/legacyI1qz3c/testfixture/baseTest","/tmp/legacyI1qz3c/testfixture/completions":"/tmp/legacyI1qz3c/testfixture/completions","/tmp/legacyI1qz3c/testfixture/testTags":"/tmp/legacyI1qz3c/testfixture/testTags"},"showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/runner/go/bin/dlv","env":{"GOPATH":"/home/runner/go"},"__buildDir":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap [<- from client]{\"seq\":2,\"type\":\"request\",\"command\":\"launch\",\"arguments\":{\"name\":\"Launch\",\"type\":\"go\",\"request\":\"launch\",\"mode\":\"debug\",\"program\":\"./main.go\",\"cwd\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\"noDebug\":true,\"debugAdapter\":\"dlv-dap\",\"logOutput\":\"dap,debugger\",\"showLog\":true,\"trace\":\"verbose\",\"output\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21\",\"packagePathToGoModPathMap\":{\"/home/runner/go/src/test/testfixture\":\"/home/runner/go/src/test/testfixture\",\"/home/runner/go/src/test/testfixture/baseTest\":\"\",\"/home/runner/go/src/test/testfixture/gogetdocTestData\":\"\",\"/home/runner/go/src/test/testfixture/completions\":\"\",\"/home/runner/go/src/test/testfixture/testTags\":\"\",\"/tmp/legacyI1qz3c/testfixture/baseTest\":\"/tmp/legacyI1qz3c/testfixture/baseTest\",\"/tmp/legacyI1qz3c/testfixture/completions\":\"/tmp/legacyI1qz3c/testfixture/completions\",\"/tmp/legacyI1qz3c/testfixture/testTags\":\"/tmp/legacyI1qz3c/testfixture/testTags\"},\"showRegisters\":false,\"showGlobalVariables\":false,\"substitutePath\":[],\"dlvFlags\":[],\"hideSystemGoroutines\":false,\"dlvToolPath\":\"/home/runner/go/bin/dlv\",\"env\":{\"GOPATH\":\"/home/runner/go\"},\"__buildDir\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap parsed launch config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"./main.go\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21\",\n\t\"noDebug\": true,\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap building from \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\": [go build -o /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21 -gcflags all=-N -l ./main.go]\n2023-10-04T11:09:48Z debug layer=dap launching binary '/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21' with config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/main.go\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_21\",\n\t\"noDebug\": true,\n\t\"dlvCwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"success\":true,\"command\":\"launch\"}\n"}}
<- server: {"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"console\",\"output\":\"Process 13[316](https://github.com/golang/vscode-go/actions/runs/6405099820/job/17386972981#step:9:317) has exited with status 0\\n\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 13316 has exited with status 0\n"}}
<- server: {"seq":0,"type":"event","event":"terminated","body":{}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:09:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n"}}
      4) should run file program without cwd set (noDebug)
should run file program without cwd set (noDebug) FAILED: DAP Trace
>> accepted connection from client
-> server: {"type":"request","seq":1,"command":"initialize","arguments":{"adapterID":"go","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Starting: /home/runner/go/bin/dlv dap --log=true --log-output=dap,debugger --listen=127.0.0.1:38891 --log-dest=3 from /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"DAP server listening at: 127.0.0.1:38891\n2023-10-04T11:10:48Z debug layer=dap DAP server pid = 13331\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap DAP connection 1 started\n"}}
<- server: {"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap [<- from client]{\"seq\":1,\"type\":\"request\",\"command\":\"initialize\",\"arguments\":{\"adapterID\":\"go\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\"}}\n2023-10-04T11:10:48Z 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,\"supportsDelayedStackTraceLoading\":true,\"supportsLogPoints\":true,\"supportsDisassembleRequest\":true,\"supportsClipboardContext\":true,\"supportsSteppingGranularity\":true,\"supportsInstructionBreakpoints\":true}}\n"}}
-> server: {"type":"request","seq":2,"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":"./main.go","noDebug":true,"debugAdapter":"dlv-dap","logOutput":"dap,debugger","showLog":true,"trace":"verbose","output":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22","packagePathToGoModPathMap":{"/home/runner/go/src/test/testfixture":"/home/runner/go/src/test/testfixture","/home/runner/go/src/test/testfixture/baseTest":"","/home/runner/go/src/test/testfixture/gogetdocTestData":"","/home/runner/go/src/test/testfixture/completions":"","/home/runner/go/src/test/testfixture/testTags":"","/tmp/legacyI1qz3c/testfixture/baseTest":"/tmp/legacyI1qz3c/testfixture/baseTest","/tmp/legacyI1qz3c/testfixture/completions":"/tmp/legacyI1qz3c/testfixture/completions","/tmp/legacyI1qz3c/testfixture/testTags":"/tmp/legacyI1qz3c/testfixture/testTags"},"showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/runner/go/bin/dlv","env":{"GOPATH":"/home/runner/go"},"__buildDir":"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap [<- from client]{\"seq\":2,\"type\":\"request\",\"command\":\"launch\",\"arguments\":{\"name\":\"Launch\",\"type\":\"go\",\"request\":\"launch\",\"mode\":\"debug\",\"program\":\"./main.go\",\"noDebug\":true,\"debugAdapter\":\"dlv-dap\",\"logOutput\":\"dap,debugger\",\"showLog\":true,\"trace\":\"verbose\",\"output\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22\",\"packagePathToGoModPathMap\":{\"/home/runner/go/src/test/testfixture\":\"/home/runner/go/src/test/testfixture\",\"/home/runner/go/src/test/testfixture/baseTest\":\"\",\"/home/runner/go/src/test/testfixture/gogetdocTestData\":\"\",\"/home/runner/go/src/test/testfixture/completions\":\"\",\"/home/runner/go/src/test/testfixture/testTags\":\"\",\"/tmp/legacyI1qz3c/testfixture/baseTest\":\"/tmp/legacyI1qz3c/testfixture/baseTest\",\"/tmp/legacyI1qz3c/testfixture/completions\":\"/tmp/legacyI1qz3c/testfixture/completions\",\"/tmp/legacyI1qz3c/testfixture/testTags\":\"/tmp/legacyI1qz3c/testfixture/testTags\"},\"showRegisters\":false,\"showGlobalVariables\":false,\"substitutePath\":[],\"dlvFlags\":[],\"hideSystemGoroutines\":false,\"dlvToolPath\":\"/home/runner/go/bin/dlv\",\"env\":{\"GOPATH\":\"/home/runner/go\"},\"__buildDir\":\"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\"}}\n2023-10-04T11:10:48Z debug layer=dap parsed launch config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"./main.go\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22\",\n\t\"noDebug\": true,\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap building from \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\": [go build -o /home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22 -gcflags all=-N -l ./main.go]\n2023-10-04T11:10:48Z debug layer=dap launching binary '/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22' with config: {\n\t\"mode\": \"debug\",\n\t\"program\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/main.go\",\n\t\"cwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"buildFlags\": {},\n\t\"output\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest/__debug_bin_22\",\n\t\"noDebug\": true,\n\t\"dlvCwd\": \"/home/runner/work/vscode-go/vscode-go/test/testdata/cwdTest/cwdTest\",\n\t\"env\": {\n\t\t\"GOPATH\": \"/home/runner/go\"\n\t},\n\t\"backend\": \"default\",\n\t\"stackTraceDepth\": 50\n}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"success\":true,\"command\":\"launch\"}\n"}}
<- server: {"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"console\",\"output\":\"Process 13372 has exited with status 0\\n\"}}\n"}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 13372 has exited with status 0\n"}}
<- server: {"seq":0,"type":"event","event":"terminated","body":{}}
<- server: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2023-10-04T11:10:48Z debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n"}}
    remote attach
2023/10/04 11:11:48 helloWorldServer starting to listen on :[329](https://github.com/golang/vscode-go/actions/runs/6405099820/job/17386972981#step:9:330)65

Setting up attach request for {"name":"Attach","type":"go","request":"attach","mode":"remote","host":"127.0.0.1","port":33731,"debugAdapter":"dlv-dap","logOutput":"dap,debugger","showLog":true,"trace":"verbose","packagePathToGoModPathMap":{"/home/runner/go/src/test/testfixture":"/home/runner/go/src/test/testfixture","/home/runner/go/src/test/testfixture/baseTest":"","/home/runner/go/src/test/testfixture/gogetdocTestData":"","/home/runner/go/src/test/testfixture/completions":"","/home/runner/go/src/test/testfixture/testTags":"","/tmp/legacyI1qz3c/testfixture/baseTest":"/tmp/legacyI1qz3c/testfixture/baseTest","/tmp/legacyI1qz3c/testfixture/completions":"/tmp/legacyI1qz3c/testfixture/completions","/tmp/legacyI1qz3c/testfixture/testTags":"/tmp/legacyI1qz3c/testfixture/testTags"},"showRegisters":false,"showGlobalVariables":false,"substitutePath":[],"dlvFlags":[],"hideSystemGoroutines":false,"dlvToolPath":"/home/runner/go/bin/dlv"}.
2023-10-04T11:11:48Z error layer=rpc writing response:write tcp 127.0.0.1:[337](https://github.com/golang/vscode-go/actions/runs/6405099820/job/17386972981#step:9:338)31->127.0.0.1:54960: use of closed network connection

Sending configuration done request for remote attach setup.

The tests basically run the program like https://github.com/golang/vscode-go/blob/master/test/testdata/cwdTest/cwdTest/main.go
that outputs to stdout and check if there are output event messages that carry the information. It looks like with delve v1.21.1, the program termination event arrives first or the output events were never generated.

I suspect go-delve/delve#3253 (cc @suzmue @aarzilli @derekparker @tttoad)

@gopherbot gopherbot added this to the Untriaged milestone Oct 5, 2023
@hyangah hyangah added the release-blocker must be fixed before the next release. label Oct 5, 2023
@hyangah hyangah modified the milestones: Untriaged, v0.40.0 Oct 5, 2023
@hyangah
Copy link
Contributor Author

hyangah commented Oct 5, 2023

One workaround is to pin delve version to the previous version until the issue is investigated. (currently we install dlv@latest)

@hyangah hyangah changed the title debug: noDebug mode is broken with delve v1.21.1 debug: noDebug mode & integratedTerminal mode tests are broken with delve v1.21.1 Oct 5, 2023
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/533316 mentions this issue: package.json: sync gopls settings ([email protected])

gopherbot pushed a commit that referenced this issue Oct 6, 2023
and pin dlv version used for testing to v1.21.0
to unbreak the debug testing.

Updates #2999

Change-Id: If66962ae23b1af6530840937517a97802d654b88
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/533316
Reviewed-by: Suzy Mueller <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
TryBot-Result: kokoro <[email protected]>
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
@hyangah
Copy link
Contributor Author

hyangah commented Oct 10, 2023

The bug was fixed at master, but we are still waiting for the official tagging.

@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/537885 mentions this issue: tools/installtools: use the latest dlv

@golang golang locked and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge release-blocker must be fixed before the next release.
Projects
None yet
Development

No branches or pull requests

2 participants