golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.89k stars 753 forks source link

Cannot catch break point on VSCode 1.58 #1632

Closed qjebbs closed 3 years ago

qjebbs commented 3 years ago

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

Share the Go related settings you have added/edited

"go.useLanguageServer": true,
    "go.delveConfig": {
        "apiVersion": 2,
        "showGlobalVariables": false,
        "debugAdapter": "dlv-dap",  // cannot catch break point no matter dlv-dap or legacy here
        "substitutePath": []
    },

Describe the bug

  1. cannot catch any break point of the main program
  2. in Developer Tools, DevTools failed to load SourceMap: Could not load content for ... : Load canceled due to load timeout was seen
  3. debugging tests functions (func Test...(t *testing.T)) always work
  4. sometimes, after debugging some tests, debugging main program works, but still not work in most times
  5. rolling back to VSCode 1.57 solves the problem

Steps to reproduce the behavior:

  1. Open any Go workspace
  2. Setup any break point, e.g.: at the first line of main()
  3. Start debugging,
  4. Not catch any break points
hyangah commented 3 years ago

@qjebbs Cab you please share the following info?

cc @suzmue @polinasok

polinasok commented 3 years ago

When you set the breakpoint, what color is the dot? Was the breakpoint set successfully (red) or failed (grey)? With dlv-dap there should also be an error message with hover if it failed.

qjebbs commented 3 years ago

@polinasok It's red.

@hyangah

dlv-dap version output
/Users/jebbs/etc/Go/bin/dlv-dap: go1.16.5
    path    github.com/go-delve/delve/cmd/dlv
    mod github.com/go-delve/delve   v1.7.1-0.20210719150918-38aaf274a92f    h1:3VurRqNTCY6/g3q8OH9AkwjujXaFrYgmrk7Sbc2OtB4=
    dep github.com/cosiner/argv v0.1.0  h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
    dep github.com/cpuguy83/go-md2man   v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
    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 v1.5.2  h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
    dep github.com/sirupsen/logrus  v1.6.0  h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
    dep github.com/spf13/cobra  v0.0.0-20170417170307-b6cb39589372  h1:eRfW1vRS4th8IX2iQeyqQ8cOUNOySvAYJ0IUvTXGoYA=
    dep github.com/spf13/pflag  v0.0.0-20170417173400-9e4c21054fa1  h1:7bozMfSdo41n2NOc0GsVTTVUiA+Ncaj6pXNpm4UHKys=
    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-20200625212154-ddb9806d33ae  h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
    dep gopkg.in/yaml.v2    v2.2.1  h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
launch.json:
{ "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}" } ] }
go debug msg with `dlv-dap`:
  [Verbose - 08:54:25.2] session f3e49320-36cf-4ce1-815a-913f0c52629c will start with {"name":"Launch","type":"go","request":"launch","mode":"debug","program":"/Users/jebbs/Coding/mailer/mailer","debugAdapter":"dlv-dap","trace":"verbose","showLog":true,"logOutput":"dap","__configurationTarget":5,"noDebug":true,"packagePathToGoModPathMap":{"/Users/jebbs/Coding/mailer/mailer":"/Users/jebbs/Coding/mailer/mailer"},"apiVersion":2,"dlvLoadConfig":{"followPointers":true,"maxVariableRecurse":1,"maxStringLen":64,"maxArrayValues":64,"maxStructFields":-1},"showGlobalVariables":false,"substitutePath":[],"dlvToolPath":"/Users/jebbs/etc/Go/bin/dlv-dap","env":{"ELECTRON_RUN_AS_NODE":"1","USER":"jebbs","COMMAND_MODE":"unix2003","PATH":"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin","LOGNAME":"jebbs","SSH_AUTH_SOCK":"/Users/jebbs/.gnupg/S.gpg-agent.ssh","HOME":"/Users/jebbs","SHELL":"/bin/zsh","TMPDIR":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/","__CF_USER_TEXT_ENCODING":"0x1F5:0x19:0x34","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000004b.Electron","XPC_FLAGS":"0x0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","VSCODE_CWD":"/","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_NLS_CONFIG":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}","VSCODE_CODE_CACHE_PATH":"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3","VSCODE_IPC_HOOK":"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock","VSCODE_PID":"74593","SHLVL":"0","PWD":"/","OLDPWD":"/","ZSH":"/Users/jebbs/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","AUTOJUMP_SOURCED":"1","AUTOJUMP_ERROR_PATH":"/Users/jebbs/Library/autojump/errors.log","GOROOT":"/usr/local/opt/go/libexec","GOPATH":"/Users/jebbs/etc/Go/","WORKON_HOME":"/Users/jebbs/etc/python","MAILER_CONFIG":"/Users/jebbs/.mailer","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","VSCODE_LOG_NATIVE":"false","VSCODE_IPC_HOOK_EXTHOST":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_LOG_STACK":"false","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","GOMODCACHE":"/Users/jebbs/etc/Go/pkg/mod","GOPROXY":"https://proxy.golang.org,direct"}}

[Trace - 08:54:25.3] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Starting: /Users/jebbs/etc/Go/bin/dlv-dap dap --listen=127.0.0.1:52094 --log=true --log-output=dap --log-dest=3\n"}}

[Info - 08:54:25.3] Starting: /Users/jebbs/etc/Go/bin/dlv-dap dap --listen=127.0.0.1:52094 --log=true --log-output=dap --log-dest=3

[Trace - 08:54:25.9] client -> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"zh-cn","supportsProgressReporting":true,"supportsInvalidatedEvent":true},"type":"request","seq":1}

[Trace - 08:54:25.45] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"DAP server listening at: 127.0.0.1:52094\n"}}

[Info - 08:54:25.45] DAP server listening at: 127.0.0.1:52094

[Trace - 08:54:25.77] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:25+08:00 debug layer=dap DAP server pid = 75441\n"}}

[Info - 08:54:25.77] 2021-07-22T08:54:25+08:00 debug layer=dap DAP server pid = 75441

[Verbose - 08:54:25.78] Running dlv dap server: port=52094 pid=75441

[Trace - 08:54:25.79] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:25+08:00 debug layer=dap [<- from client]{\"seq\":1,\"type\":\"request\",\"command\":\"initialize\",\"arguments\":{\"clientID\":\"vscode\",\"clientName\":\"Visual Studio Code\",\"adapterID\":\"go\",\"locale\":\"zh-cn\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\",\"supportsVariableType\":true,\"supportsVariablePaging\":true,\"supportsRunInTerminalRequest\":true,\"supportsProgressReporting\":true,\"supportsInvalidatedEvent\":true}}\n"}}

[Info - 08:54:25.80] 2021-07-22T08:54:25+08:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","locale":"zh-cn","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true}}

[Trace - 08:54:25.80] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:25+08: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}}\n"}}

[Info - 08:54:25.80] 2021-07-22T08:54:25+08: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}}

[Trace - 08:54:25.81] 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}}

[Trace - 08:54:25.92] client -> {"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":"/Users/jebbs/Coding/mailer/mailer","debugAdapter":"dlv-dap","trace":"verbose","showLog":true,"logOutput":"dap","__configurationTarget":5,"noDebug":true,"packagePathToGoModPathMap":{"/Users/jebbs/Coding/mailer/mailer":"/Users/jebbs/Coding/mailer/mailer"},"apiVersion":2,"dlvLoadConfig":{"followPointers":true,"maxVariableRecurse":1,"maxStringLen":64,"maxArrayValues":64,"maxStructFields":-1},"showGlobalVariables":false,"substitutePath":[],"dlvToolPath":"/Users/jebbs/etc/Go/bin/dlv-dap","env":{"ELECTRON_RUN_AS_NODE":"1","USER":"jebbs","COMMAND_MODE":"unix2003","PATH":"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin","LOGNAME":"jebbs","SSH_AUTH_SOCK":"/Users/jebbs/.gnupg/S.gpg-agent.ssh","HOME":"/Users/jebbs","SHELL":"/bin/zsh","TMPDIR":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/","__CF_USER_TEXT_ENCODING":"0x1F5:0x19:0x34","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000004b.Electron","XPC_FLAGS":"0x0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","VSCODE_CWD":"/","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_NLS_CONFIG":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}","VSCODE_CODE_CACHE_PATH":"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3","VSCODE_IPC_HOOK":"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock","VSCODE_PID":"74593","SHLVL":"0","PWD":"/","OLDPWD":"/","ZSH":"/Users/jebbs/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","AUTOJUMP_SOURCED":"1","AUTOJUMP_ERROR_PATH":"/Users/jebbs/Library/autojump/errors.log","GOROOT":"/usr/local/opt/go/libexec","GOPATH":"/Users/jebbs/etc/Go/","WORKON_HOME":"/Users/jebbs/etc/python","MAILER_CONFIG":"/Users/jebbs/.mailer","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","VSCODE_LOG_NATIVE":"false","VSCODE_IPC_HOOK_EXTHOST":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_LOG_STACK":"false","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","GOMODCACHE":"/Users/jebbs/etc/Go/pkg/mod","GOPROXY":"https://proxy.golang.org,direct"},"__sessionId":"f3e49320-36cf-4ce1-815a-913f0c52629c"},"type":"request","seq":2}

[Trace - 08:54:25.94] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:25+08:00 debug layer=dap [<- from client]{\"seq\":2,\"type\":\"request\",\"command\":\"launch\",\"arguments\":{\"__configurationTarget\":5,\"__sessionId\":\"f3e49320-36cf-4ce1-815a-913f0c52629c\",\"apiVersion\":2,\"debugAdapter\":\"dlv-dap\",\"dlvLoadConfig\":{\"followPointers\":true,\"maxArrayValues\":64,\"maxStringLen\":64,\"maxStructFields\":-1,\"maxVariableRecurse\":1},\"dlvToolPath\":\"/Users/jebbs/etc/Go/bin/dlv-dap\",\"env\":{\"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL\":\"true\",\"AUTOJUMP_ERROR_PATH\":\"/Users/jebbs/Library/autojump/errors.log\",\"AUTOJUMP_SOURCED\":\"1\",\"COMMAND_MODE\":\"unix2003\",\"ELECTRON_RUN_AS_NODE\":\"1\",\"GOMODCACHE\":\"/Users/jebbs/etc/Go/pkg/mod\",\"GOPATH\":\"/Users/jebbs/etc/Go/\",\"GOPROXY\":\"https://proxy.golang.org,direct\",\"GOROOT\":\"/usr/local/opt/go/libexec\",\"HOME\":\"/Users/jebbs\",\"LESS\":\"-R\",\"LOGNAME\":\"jebbs\",\"LSCOLORS\":\"Gxfxcxdxbxegedabagacad\",\"MAILER_CONFIG\":\"/Users/jebbs/.mailer\",\"OLDPWD\":\"/\",\"ORIGINAL_XDG_CURRENT_DESKTOP\":\"undefined\",\"PAGER\":\"less\",\"PATH\":\"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin\",\"PWD\":\"/\",\"SHELL\":\"/bin/zsh\",\"SHLVL\":\"0\",\"SSH_AUTH_SOCK\":\"/Users/jebbs/.gnupg/S.gpg-agent.ssh\",\"TMPDIR\":\"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/\",\"USER\":\"jebbs\",\"VSCODE_AMD_ENTRYPOINT\":\"vs/workbench/services/extensions/node/extensionHostProcess\",\"VSCODE_BROWSER_CODE_LOADING\":\"bypassHeatCheck\",\"VSCODE_CODE_CACHE_PATH\":\"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3\",\"VSCODE_CWD\":\"/\",\"VSCODE_HANDLES_UNCAUGHT_ERRORS\":\"true\",\"VSCODE_IPC_HOOK\":\"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock\",\"VSCODE_IPC_HOOK_EXTHOST\":\"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock\",\"VSCODE_LOG_NATIVE\":\"false\",\"VSCODE_LOG_STACK\":\"false\",\"VSCODE_NLS_CONFIG\":\"{\\\"locale\\\":\\\"zh-cn\\\",\\\"availableLanguages\\\":{\\\"*\\\":\\\"zh-cn\\\"},\\\"_languagePackId\\\":\\\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\",\\\"_translationsConfigFile\\\":\\\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\\\",\\\"_cacheRoot\\\":\\\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\",\\\"_resolvedLanguagePackCoreLocation\\\":\\\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\\\",\\\"_corruptedFile\\\":\\\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\\\",\\\"_languagePackSupport\\\":true}\",\"VSCODE_PID\":\"74593\",\"VSCODE_PIPE_LOGGING\":\"true\",\"VSCODE_VERBOSE_LOGGING\":\"true\",\"WORKON_HOME\":\"/Users/jebbs/etc/python\",\"XPC_FLAGS\":\"0x0\",\"XPC_SERVICE_NAME\":\"com.apple.xpc.launchd.oneshot.0x1000004b.Electron\",\"ZSH\":\"/Users/jebbs/.oh-my-zsh\",\"_\":\"/Applications/Visual Studio Code.app/Contents/MacOS/Electron\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x19:0x34\"},\"logOutput\":\"dap\",\"mode\":\"debug\",\"name\":\"Launch\",\"noDebug\":true,\"packagePathToGoModPathMap\":{\"/Users/jebbs/Coding/mailer/mailer\":\"/Users/jebbs/Coding/mailer/mailer\"},\"program\":\"/Users/jebbs/Coding/mailer/mailer\",\"request\":\"launch\",\"showGlobalVariables\":false,\"showLog\":true,\"substitutePath\":[],\"trace\":\"verbose\",\"type\":\"go\"}}\n"}}

[Info - 08:54:25.94] 2021-07-22T08:54:25+08:00 debug layer=dap [<- from client]{"seq":2,"type":"request","command":"launch","arguments":{"__configurationTarget":5,"__sessionId":"f3e49320-36cf-4ce1-815a-913f0c52629c","apiVersion":2,"debugAdapter":"dlv-dap","dlvLoadConfig":{"followPointers":true,"maxArrayValues":64,"maxStringLen":64,"maxStructFields":-1,"maxVariableRecurse":1},"dlvToolPath":"/Users/jebbs/etc/Go/bin/dlv-dap","env":{"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","AUTOJUMP_ERROR_PATH":"/Users/jebbs/Library/autojump/errors.log","AUTOJUMP_SOURCED":"1","COMMAND_MODE":"unix2003","ELECTRON_RUN_AS_NODE":"1","GOMODCACHE":"/Users/jebbs/etc/Go/pkg/mod","GOPATH":"/Users/jebbs/etc/Go/","GOPROXY":"https://proxy.golang.org,direct","GOROOT":"/usr/local/opt/go/libexec","HOME":"/Users/jebbs","LESS":"-R","LOGNAME":"jebbs","LSCOLORS":"Gxfxcxdxbxegedabagacad","MAILER_CONFIG":"/Users/jebbs/.mailer","OLDPWD":"/","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","PAGER":"less","PATH":"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin","PWD":"/","SHELL":"/bin/zsh","SHLVL":"0","SSH_AUTH_SOCK":"/Users/jebbs/.gnupg/S.gpg-agent.ssh","TMPDIR":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/","USER":"jebbs","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_CODE_CACHE_PATH":"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3","VSCODE_CWD":"/","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock","VSCODE_IPC_HOOK_EXTHOST":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock","VSCODE_LOG_NATIVE":"false","VSCODE_LOG_STACK":"false","VSCODE_NLS_CONFIG":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}","VSCODE_PID":"74593","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","WORKON_HOME":"/Users/jebbs/etc/python","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000004b.Electron","ZSH":"/Users/jebbs/.oh-my-zsh","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","__CF_USER_TEXT_ENCODING":"0x1F5:0x19:0x34"},"logOutput":"dap","mode":"debug","name":"Launch","noDebug":true,"packagePathToGoModPathMap":{"/Users/jebbs/Coding/mailer/mailer":"/Users/jebbs/Coding/mailer/mailer"},"program":"/Users/jebbs/Coding/mailer/mailer","request":"launch","showGlobalVariables":false,"showLog":true,"substitutePath":[],"trace":"verbose","type":"go"}}

[Trace - 08:54:25.95] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:25+08:00 debug layer=dap building binary at /Users/jebbs/Coding/mailer/mailer/__debug_bin\n"}}

[Info - 08:54:25.95] 2021-07-22T08:54:25+08:00 debug layer=dap building binary at /Users/jebbs/Coding/mailer/mailer/__debug_bin

[Trace - 08:54:30.693] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:30+08:00 debug layer=dap running program in /Users/jebbs/Coding/mailer/mailer\n\n"}}

[Info - 08:54:30.694] 2021-07-22T08:54:30+08:00 debug layer=dap running program in /Users/jebbs/Coding/mailer/mailer

[Trace - 08:54:30.697] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:30+08:00 debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"success\":true,\"command\":\"launch\"}\n"}}

[Info - 08:54:30.698] 2021-07-22T08:54:30+08:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}

[Trace - 08:54:30.698] client <- {"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}

[Trace - 08:54:31.543] client <- {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"A platform for email clients development.\n\nUsage:\n\n\t__debug_bin  [arguments]\n\nThe commands are:\n\n\trun           run & send emails\n\tai            AI tools\n\tload          load a package\n\ttasks         manage tasks\n\trm            remove mail, person, product\n\tinbox         inbox management\n\tstatus        manage statuses\n\tapi           call mailer API\n\tconvert       convert config files\n\tversion       print version\n\nUse \"__debug_bin help \" for more information about a command.\n\nAdditional help topics:\n\n\tformat-loader config formats and loading\n\tconfig-merge  config merge logic\n\nUse \"__debug_bin help \" for more information about that topic.\n\n"}}

[Trace - 08:54:31.544] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"console\",\"output\":\"Process 75481 has exited with status 0\\n\",\"source\":{}}}\n"}}

[Info - 08:54:31.545] 2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 75481 has exited with status 0\n","source":{}}}

[Trace - 08:54:31.545] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n"}}

[Info - 08:54:31.545] 2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}}

[Trace - 08:54:31.545] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Process 75481 has exited with status 0\n","source":{}}}

[Trace - 08:54:31.546] client <- {"seq":0,"type":"event","event":"terminated","body":{}}

[Trace - 08:54:31.548] client -> {"command":"disconnect","arguments":{"restart":false,"terminateDebuggee":false},"type":"request","seq":3}

[Trace - 08:54:31.550] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:31+08:00 debug layer=dap [<- from client]{\"seq\":3,\"type\":\"request\",\"command\":\"disconnect\",\"arguments\":{}}\n"}}

[Info - 08:54:31.550] 2021-07-22T08:54:31+08:00 debug layer=dap [<- from client]{"seq":3,"type":"request","command":"disconnect","arguments":{}}

[Trace - 08:54:31.550] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{\"seq\":0,\"type\":\"response\",\"request_seq\":3,\"success\":true,\"command\":\"disconnect\"}\n2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{\"seq\":0,\"type\":\"event\",\"event\":\"terminated\",\"body\":{}}\n2021-07-22T08:54:31+08:00 debug layer=dap DAP server stopping...\n"}}

[Info - 08:54:31.550] 2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":3,"success":true,"command":"disconnect"}
2021-07-22T08:54:31+08:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}}
2021-07-22T08:54:31+08:00 debug layer=dap DAP server stopping...

[Trace - 08:54:31.551] client <- {"seq":0,"type":"response","request_seq":3,"success":true,"command":"disconnect"}

[Trace - 08:54:31.551] client <- {"seq":0,"type":"event","event":"terminated","body":{}}

[Trace - 08:54:31.554] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"2021-07-22T08:54:31+08:00 debug layer=dap DAP server stopped\n"}}

[Info - 08:54:31.554] 2021-07-22T08:54:31+08:00 debug layer=dap DAP server stopped

[Trace - 08:54:31.555] client <- {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"dlv dap (75441) exited with code: 0\n"}}

[Info - 08:54:31.556] dlv dap (75441) exited with code: 0

[Verbose - 08:54:32.51] session f3e49320-36cf-4ce1-815a-913f0c52629c will stop

[Info - 08:54:32.53] dlv dap process(75441) already exited (exit code: 0)
go debug msg with `leagacy`:
  [Verbose - 09:00:07.215] session a55db13c-2ee8-4867-93cf-1839067cbfed will start with {"name":"Launch","type":"go","request":"launch","mode":"debug","program":"/Users/jebbs/Coding/mailer/mailer","trace":"verbose","showLog":true,"logOutput":"dap","__configurationTarget":5,"noDebug":true,"packagePathToGoModPathMap":{"/Users/jebbs/Coding/mailer/mailer":"/Users/jebbs/Coding/mailer/mailer"},"debugAdapter":"legacy","apiVersion":2,"dlvLoadConfig":{"followPointers":true,"maxVariableRecurse":1,"maxStringLen":64,"maxArrayValues":64,"maxStructFields":-1},"showGlobalVariables":false,"substitutePath":[],"dlvToolPath":"/Users/jebbs/etc/Go/bin/dlv","env":{"ELECTRON_RUN_AS_NODE":"1","USER":"jebbs","COMMAND_MODE":"unix2003","PATH":"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin","LOGNAME":"jebbs","SSH_AUTH_SOCK":"/Users/jebbs/.gnupg/S.gpg-agent.ssh","HOME":"/Users/jebbs","SHELL":"/bin/zsh","TMPDIR":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/","__CF_USER_TEXT_ENCODING":"0x1F5:0x19:0x34","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000004b.Electron","XPC_FLAGS":"0x0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","VSCODE_CWD":"/","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_NLS_CONFIG":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}","VSCODE_CODE_CACHE_PATH":"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3","VSCODE_IPC_HOOK":"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock","VSCODE_PID":"74593","SHLVL":"0","PWD":"/","OLDPWD":"/","ZSH":"/Users/jebbs/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","AUTOJUMP_SOURCED":"1","AUTOJUMP_ERROR_PATH":"/Users/jebbs/Library/autojump/errors.log","GOROOT":"/usr/local/opt/go/libexec","GOPATH":"/Users/jebbs/etc/Go/","WORKON_HOME":"/Users/jebbs/etc/python","MAILER_CONFIG":"/Users/jebbs/.mailer","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","VSCODE_LOG_NATIVE":"false","VSCODE_IPC_HOOK_EXTHOST":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_LOG_STACK":"false","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","GOMODCACHE":"/Users/jebbs/etc/Go/pkg/mod","GOPROXY":"https://proxy.golang.org,direct"}}

[Trace - 09:00:07.228] client -> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"zh-cn","supportsProgressReporting":true,"supportsInvalidatedEvent":true},"type":"request","seq":1}

[Trace - 09:00:07.463] client <- {"seq":1,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsSetVariable":true}}

[Trace - 09:00:07.466] client -> {"command":"launch","arguments":{"name":"Launch","type":"go","request":"launch","mode":"debug","program":"/Users/jebbs/Coding/mailer/mailer","trace":"verbose","showLog":true,"logOutput":"dap","__configurationTarget":5,"noDebug":true,"packagePathToGoModPathMap":{"/Users/jebbs/Coding/mailer/mailer":"/Users/jebbs/Coding/mailer/mailer"},"debugAdapter":"legacy","apiVersion":2,"dlvLoadConfig":{"followPointers":true,"maxVariableRecurse":1,"maxStringLen":64,"maxArrayValues":64,"maxStructFields":-1},"showGlobalVariables":false,"substitutePath":[],"dlvToolPath":"/Users/jebbs/etc/Go/bin/dlv","env":{"ELECTRON_RUN_AS_NODE":"1","USER":"jebbs","COMMAND_MODE":"unix2003","PATH":"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin","LOGNAME":"jebbs","SSH_AUTH_SOCK":"/Users/jebbs/.gnupg/S.gpg-agent.ssh","HOME":"/Users/jebbs","SHELL":"/bin/zsh","TMPDIR":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/","__CF_USER_TEXT_ENCODING":"0x1F5:0x19:0x34","XPC_SERVICE_NAME":"com.apple.xpc.launchd.oneshot.0x1000004b.Electron","XPC_FLAGS":"0x0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","VSCODE_CWD":"/","VSCODE_BROWSER_CODE_LOADING":"bypassHeatCheck","VSCODE_NLS_CONFIG":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}","VSCODE_CODE_CACHE_PATH":"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3","VSCODE_IPC_HOOK":"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock","VSCODE_PID":"74593","SHLVL":"0","PWD":"/","OLDPWD":"/","ZSH":"/Users/jebbs/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","AUTOJUMP_SOURCED":"1","AUTOJUMP_ERROR_PATH":"/Users/jebbs/Library/autojump/errors.log","GOROOT":"/usr/local/opt/go/libexec","GOPATH":"/Users/jebbs/etc/Go/","WORKON_HOME":"/Users/jebbs/etc/python","MAILER_CONFIG":"/Users/jebbs/.mailer","_":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_AMD_ENTRYPOINT":"vs/workbench/services/extensions/node/extensionHostProcess","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","VSCODE_LOG_NATIVE":"false","VSCODE_IPC_HOOK_EXTHOST":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_LOG_STACK":"false","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","GOMODCACHE":"/Users/jebbs/etc/Go/pkg/mod","GOPROXY":"https://proxy.golang.org,direct"},"__sessionId":"a55db13c-2ee8-4867-93cf-1839067cbfed"},"type":"request","seq":2}

[Trace - 09:00:07.483] client <- {"seq":2,"type":"event","event":"output","body":{"category":"console","output":"Verbose logs are written to:\n"}}

[Trace - 09:00:07.487] client <- {"seq":3,"type":"event","event":"output","body":{"category":"console","output":"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-go-debug.txt\n"}}

[Trace - 09:00:07.493] client <- {"seq":4,"type":"event","event":"output","body":{"category":"stdout","output":"2021-7-22, 01:00:07.492 UTC\n"}}

[Trace - 09:00:07.500] client <- {"seq":5,"type":"event","event":"output","body":{"category":"stdout","output":"From client: initialize({\"clientID\":\"vscode\",\"clientName\":\"Visual Studio Code\",\"adapterID\":\"go\",\"pathFormat\":\"path\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"supportsVariableType\":true,\"supportsVariablePaging\":true,\"supportsRunInTerminalRequest\":true,\"locale\":\"zh-cn\",\"supportsProgressReporting\":true,\"supportsInvalidatedEvent\":true})\n"}}

[Trace - 09:00:07.500] client <- {"seq":6,"type":"event","event":"output","body":{"category":"console","output":"InitializeRequest\n"}}

[Trace - 09:00:07.501] client <- {"seq":7,"type":"event","event":"output","body":{"category":"stdout","output":"To client: {\"seq\":0,\"type\":\"response\",\"request_seq\":1,\"command\":\"initialize\",\"success\":true,\"body\":{\"supportsConditionalBreakpoints\":true,\"supportsConfigurationDoneRequest\":true,\"supportsSetVariable\":true}}\n"}}

[Trace - 09:00:07.501] client <- {"seq":8,"type":"event","event":"output","body":{"category":"console","output":"InitializeResponse\n"}}

[Trace - 09:00:07.501] client <- {"seq":9,"type":"event","event":"output","body":{"category":"stdout","output":"From client: launch({\"name\":\"Launch\",\"type\":\"go\",\"request\":\"launch\",\"mode\":\"debug\",\"program\":\"/Users/jebbs/Coding/mailer/mailer\",\"trace\":\"verbose\",\"showLog\":true,\"logOutput\":\"dap\",\"__configurationTarget\":5,\"noDebug\":true,\"packagePathToGoModPathMap\":{\"/Users/jebbs/Coding/mailer/mailer\":\"/Users/jebbs/Coding/mailer/mailer\"},\"debugAdapter\":\"legacy\",\"apiVersion\":2,\"dlvLoadConfig\":{\"followPointers\":true,\"maxVariableRecurse\":1,\"maxStringLen\":64,\"maxArrayValues\":64,\"maxStructFields\":-1},\"showGlobalVariables\":false,\"substitutePath\":[],\"dlvToolPath\":\"/Users/jebbs/etc/Go/bin/dlv\",\"env\":{\"ELECTRON_RUN_AS_NODE\":\"1\",\"USER\":\"jebbs\",\"COMMAND_MODE\":\"unix2003\",\"PATH\":\"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin\",\"LOGNAME\":\"jebbs\",\"SSH_AUTH_SOCK\":\"/Users/jebbs/.gnupg/S.gpg-agent.ssh\",\"HOME\":\"/Users/jebbs\",\"SHELL\":\"/bin/zsh\",\"TMPDIR\":\"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x19:0x34\",\"XPC_SERVICE_NAME\":\"com.apple.xpc.launchd.oneshot.0x1000004b.Electron\",\"XPC_FLAGS\":\"0x0\",\"ORIGINAL_XDG_CURRENT_DESKTOP\":\"undefined\",\"VSCODE_CWD\":\"/\",\"VSCODE_BROWSER_CODE_LOADING\":\"bypassHeatCheck\",\"VSCODE_NLS_CONFIG\":\"{\\\"locale\\\":\\\"zh-cn\\\",\\\"availableLanguages\\\":{\\\"*\\\":\\\"zh-cn\\\"},\\\"_languagePackId\\\":\\\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\\\",\\\"_translationsConfigFile\\\":\\\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\\\",\\[...]\n"}}

[Trace - 09:00:07.501] client <- {"seq":10,"type":"event","event":"output","body":{"category":"console","output":"LaunchRequest\n"}}

[Trace - 09:00:07.505] client <- {"seq":11,"type":"event","event":"output","body":{"category":"console","output":"Using GOPATH: /Users/jebbs/etc/Go/\n"}}

[Trace - 09:00:07.505] client <- {"seq":12,"type":"event","event":"output","body":{"category":"console","output":"Using GOROOT: /usr/local/opt/go/libexec\n"}}

[Trace - 09:00:07.505] client <- {"seq":13,"type":"event","event":"output","body":{"category":"console","output":"Using PATH: /usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin\n"}}

[Trace - 09:00:07.506] client <- {"seq":14,"type":"event","event":"output","body":{"category":"console","output":"  export USER=\"jebbs\"\n"}}

[Trace - 09:00:07.506] client <- {"seq":15,"type":"event","event":"output","body":{"category":"console","output":"  export COMMAND_MODE=\"unix2003\"\n"}}

[Trace - 09:00:07.506] client <- {"seq":16,"type":"event","event":"output","body":{"category":"console","output":"  export PATH=\"/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/jebbs/.cargo/bin:/Users/jebbs/etc/Go//bin\"\n"}}

[Trace - 09:00:07.506] client <- {"seq":17,"type":"event","event":"output","body":{"category":"console","output":"  export LOGNAME=\"jebbs\"\n"}}

[Trace - 09:00:07.507] client <- {"seq":18,"type":"event","event":"output","body":{"category":"console","output":"  export SSH_AUTH_SOCK=\"/Users/jebbs/.gnupg/S.gpg-agent.ssh\"\n"}}

[Trace - 09:00:07.507] client <- {"seq":19,"type":"event","event":"output","body":{"category":"console","output":"  export HOME=\"/Users/jebbs\"\n"}}

[Trace - 09:00:07.507] client <- {"seq":20,"type":"event","event":"output","body":{"category":"console","output":"  export SHELL=\"/bin/zsh\"\n"}}

[Trace - 09:00:07.507] client <- {"seq":21,"type":"event","event":"output","body":{"category":"console","output":"  export TMPDIR=\"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/\"\n"}}

[Trace - 09:00:07.508] client <- {"seq":22,"type":"event","event":"output","body":{"category":"console","output":"  export __CF_USER_TEXT_ENCODING=\"0x1F5:0x19:0x34\"\n"}}

[Trace - 09:00:07.508] client <- {"seq":23,"type":"event","event":"output","body":{"category":"console","output":"  export XPC_SERVICE_NAME=\"com.apple.xpc.launchd.oneshot.0x1000004b.Electron\"\n"}}

[Trace - 09:00:07.508] client <- {"seq":24,"type":"event","event":"output","body":{"category":"console","output":"  export XPC_FLAGS=\"0x0\"\n"}}

[Trace - 09:00:07.509] client <- {"seq":25,"type":"event","event":"output","body":{"category":"console","output":"  export ORIGINAL_XDG_CURRENT_DESKTOP=\"undefined\"\n"}}

[Trace - 09:00:07.509] client <- {"seq":26,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_CWD=\"/\"\n"}}

[Trace - 09:00:07.509] client <- {"seq":27,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_BROWSER_CODE_LOADING=\"bypassHeatCheck\"\n"}}

[Trace - 09:00:07.509] client <- {"seq":28,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_NLS_CONFIG=\"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_translationsConfigFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/c3f126316369cd610563c75b1b1725e0679adfb3\",\"_corruptedFile\":\"/Users/jebbs/Library/Application Support/Code/clp/fa871dcc52f689d5c3b8a42d026c7d06.zh-cn/corrupted.info\",\"_languagePackSupport\":true}\"\n"}}

[Trace - 09:00:07.510] client <- {"seq":29,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_CODE_CACHE_PATH=\"/Users/jebbs/Library/Application Support/Code/CachedData/c3f126316369cd610563c75b1b1725e0679adfb3\"\n"}}

[Trace - 09:00:07.510] client <- {"seq":30,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_IPC_HOOK=\"/Users/jebbs/Library/Application Support/Code/1.58.2-main.sock\"\n"}}

[Trace - 09:00:07.510] client <- {"seq":31,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_PID=\"74593\"\n"}}

[Trace - 09:00:07.510] client <- {"seq":32,"type":"event","event":"output","body":{"category":"console","output":"  export SHLVL=\"0\"\n"}}

[Trace - 09:00:07.511] client <- {"seq":33,"type":"event","event":"output","body":{"category":"console","output":"  export PWD=\"/\"\n"}}

[Trace - 09:00:07.511] client <- {"seq":34,"type":"event","event":"output","body":{"category":"console","output":"  export OLDPWD=\"/\"\n"}}

[Trace - 09:00:07.511] client <- {"seq":35,"type":"event","event":"output","body":{"category":"console","output":"  export ZSH=\"/Users/jebbs/.oh-my-zsh\"\n"}}

[Trace - 09:00:07.511] client <- {"seq":36,"type":"event","event":"output","body":{"category":"console","output":"  export PAGER=\"less\"\n"}}

[Trace - 09:00:07.512] client <- {"seq":37,"type":"event","event":"output","body":{"category":"console","output":"  export LESS=\"-R\"\n"}}

[Trace - 09:00:07.512] client <- {"seq":38,"type":"event","event":"output","body":{"category":"console","output":"  export LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\n"}}

[Trace - 09:00:07.512] client <- {"seq":39,"type":"event","event":"output","body":{"category":"console","output":"  export AUTOJUMP_SOURCED=\"1\"\n"}}

[Trace - 09:00:07.512] client <- {"seq":40,"type":"event","event":"output","body":{"category":"console","output":"  export AUTOJUMP_ERROR_PATH=\"/Users/jebbs/Library/autojump/errors.log\"\n"}}

[Trace - 09:00:07.512] client <- {"seq":41,"type":"event","event":"output","body":{"category":"console","output":"  export GOROOT=\"/usr/local/opt/go/libexec\"\n"}}

[Trace - 09:00:07.513] client <- {"seq":42,"type":"event","event":"output","body":{"category":"console","output":"  export GOPATH=\"/Users/jebbs/etc/Go/\"\n"}}

[Trace - 09:00:07.513] client <- {"seq":43,"type":"event","event":"output","body":{"category":"console","output":"  export WORKON_HOME=\"/Users/jebbs/etc/python\"\n"}}

[Trace - 09:00:07.513] client <- {"seq":44,"type":"event","event":"output","body":{"category":"console","output":"  export MAILER_CONFIG=\"/Users/jebbs/.mailer\"\n"}}

[Trace - 09:00:07.513] client <- {"seq":45,"type":"event","event":"output","body":{"category":"console","output":"  export _=\"/Applications/Visual Studio Code.app/Contents/MacOS/Electron\"\n"}}

[Trace - 09:00:07.514] client <- {"seq":46,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_AMD_ENTRYPOINT=\"vs/workbench/services/extensions/node/extensionHostProcess\"\n"}}

[Trace - 09:00:07.514] client <- {"seq":47,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_PIPE_LOGGING=\"true\"\n"}}

[Trace - 09:00:07.514] client <- {"seq":48,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_VERBOSE_LOGGING=\"true\"\n"}}

[Trace - 09:00:07.514] client <- {"seq":49,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_LOG_NATIVE=\"false\"\n"}}

[Trace - 09:00:07.514] client <- {"seq":50,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_IPC_HOOK_EXTHOST=\"/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/vscode-ipc-a8935ae6-a2d5-4e88-8179-63a06d8ed4c0.sock\"\n"}}

[Trace - 09:00:07.515] client <- {"seq":51,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_HANDLES_UNCAUGHT_ERRORS=\"true\"\n"}}

[Trace - 09:00:07.515] client <- {"seq":52,"type":"event","event":"output","body":{"category":"console","output":"  export VSCODE_LOG_STACK=\"false\"\n"}}

[Trace - 09:00:07.515] client <- {"seq":53,"type":"event","event":"output","body":{"category":"console","output":"  export APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=\"true\"\n"}}

[Trace - 09:00:07.516] client <- {"seq":54,"type":"event","event":"output","body":{"category":"console","output":"  export GOMODCACHE=\"/Users/jebbs/etc/Go/pkg/mod\"\n"}}

[Trace - 09:00:07.516] client <- {"seq":55,"type":"event","event":"output","body":{"category":"console","output":"  export GOPROXY=\"https://proxy.golang.org,direct\"\n"}}

[Trace - 09:00:07.516] client <- {"seq":56,"type":"event","event":"output","body":{"category":"console","output":"  export ELECTRON_RUN_AS_NODE=\"1\"\n"}}

[Trace - 09:00:07.516] client <- {"seq":57,"type":"event","event":"output","body":{"category":"console","output":"Current working directory: /Users/jebbs/Coding/mailer/mailer\n"}}

[Trace - 09:00:07.517] client <- {"seq":58,"type":"event","event":"output","body":{"category":"console","output":"Building: /usr/local/opt/go/libexec/bin/go build -o=/var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/out .\n"}}

[Trace - 09:00:22.60] client <- {"seq":59,"type":"event","event":"output","body":{"category":"console","output":"Build process exiting normally null\n"}}

[Trace - 09:00:22.61] client <- {"seq":60,"type":"event","event":"output","body":{"category":"console","output":"Current working directory: /Users/jebbs/Coding/mailer/mailer\n"}}

[Trace - 09:00:22.61] client <- {"seq":61,"type":"event","event":"output","body":{"category":"console","output":"Running: /var/folders/9f/4b34z8px33723h92q17hg8xh0000gn/T/out \n"}}

[Trace - 09:00:22.69] client <- {"seq":62,"type":"event","event":"output","body":{"category":"stdout","output":"To client: {\"seq\":0,\"type\":\"response\",\"request_seq\":2,\"command\":\"launch\",\"success\":true}\n"}}

[Trace - 09:00:22.69] client <- {"seq":63,"type":"response","request_seq":2,"command":"launch","success":true}

[Trace - 09:00:22.858] client <- {"seq":64,"type":"event","event":"output","body":{"category":"stdout","output":"To client: {\"seq\":0,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"stderr\",\"output\":\"A platform for email clients development.\\n\\nUsage:\\n\\n\\tout  [arguments]\\n\\nThe commands are:\\n\\n\\trun           run & send emails\\n\\tai            AI tools\\n\\tload          load a package\\n\\ttasks         manage tasks\\n\\trm            remove mail, person, product\\n\\tinbox         inbox management\\n\\tstatus        manage statuses\\n\\tapi           call mailer API\\n\\tconvert       convert config files\\n\\tversion       print version\\n\\nUse \\\"out help \\\" for more information about a command.\\n\\nAdditional help topics:\\n\\n\\tformat-loader config formats and loading\\n\\tconfig-merge  config merge logic\\n\\nUse \\\"out help \\\" for more information about that topic.\\n\\n\"}}\n"}}

[Trace - 09:00:22.858] client <- {"seq":65,"type":"event","event":"output","body":{"category":"stderr","output":"A platform for email clients development.\n\nUsage:\n\n\tout  [arguments]\n\nThe commands are:\n\n\trun           run & send emails\n\tai            AI tools\n\tload          load a package\n\ttasks         manage tasks\n\trm            remove mail, person, product\n\tinbox         inbox management\n\tstatus        manage statuses\n\tapi           call mailer API\n\tconvert       convert config files\n\tversion       print version\n\nUse \"out help \" for more information about a command.\n\nAdditional help topics:\n\n\tformat-loader config formats and loading\n\tconfig-merge  config merge logic\n\nUse \"out help \" for more information about that topic.\n\n"}}

[Trace - 09:00:22.860] client <- {"seq":66,"type":"event","event":"output","body":{"category":"console","output":"Process exiting normally false\n"}}

[Trace - 09:00:22.860] client <- {"seq":67,"type":"event","event":"output","body":{"category":"console","output":"Sending TerminatedEvent as delve is closed\n"}}

[Trace - 09:00:22.861] client <- {"seq":68,"type":"event","event":"output","body":{"category":"stdout","output":"To client: {\"seq\":0,\"type\":\"event\",\"event\":\"terminated\"}\n"}}

[Trace - 09:00:22.861] client <- {"seq":69,"type":"event","event":"terminated"}

[Trace - 09:00:22.867] client -> {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":3}

[Trace - 09:00:22.868] client <- {"seq":70,"type":"event","event":"output","body":{"category":"stdout","output":"From client: disconnect({\"restart\":false})\n"}}

[Trace - 09:00:22.868] client <- {"seq":71,"type":"event","event":"output","body":{"category":"console","output":"DisconnectRequest\n"}}

[Trace - 09:00:22.869] client <- {"seq":72,"type":"event","event":"output","body":{"category":"console","output":"Closing Delve.\n"}}

[Trace - 09:00:22.869] client <- {"seq":73,"type":"event","event":"output","body":{"category":"console","output":"killing debugee (pid: 75675)...\n"}}

[Trace - 09:00:22.872] client <- {"seq":74,"type":"event","event":"output","body":{"category":"console","output":"DisconnectRequest to parent to shut down protocol server.\n"}}

[Trace - 09:00:22.873] client <- {"seq":75,"type":"event","event":"output","body":{"category":"stdout","output":"To client: {\"seq\":0,\"type\":\"response\",\"request_seq\":3,\"command\":\"disconnect\",\"success\":true}\n"}}

[Trace - 09:00:22.873] client <- {"seq":76,"type":"response","request_seq":3,"command":"disconnect","success":true}

[Trace - 09:00:22.873] client <- {"seq":77,"type":"event","event":"output","body":{"category":"console","output":"DisconnectResponse\n"}}

[Error - 09:00:22.985] error: Error: read error

[Info - 09:00:22.986] debug adapter exited: (code: 0, signal: undefined)

[Verbose - 09:00:23.366] session a55db13c-2ee8-4867-93cf-1839067cbfed will stop
suzmue commented 3 years ago

How are you launching the program? It appears to be running in noDebug mode, which means it will not stop on any breakpoints. Can you try using Debug: Start Debugging command?

qjebbs commented 3 years ago

Many thanks to @suzmue, and all others who helped me out of the problem!

I didn't notice the difference between these two buttons, and they did have same behaviors (debug & stop on break point, I double checked this) before VSC1.58, and I am used to press the first button, without any attention to the second one.

Tried all ways, just ignored the UI detail 😅, sorry for the noise. image