You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GoLand 2022.2.4升级后调试报错:Delve版本过旧不兼容Go 1.19.0

问题描述

升级GoLand至2022.2.4后,每次调试都会触发报错,核心提示为Delve版本过旧,最高仅支持Go 1.17,无法兼容当前使用的Go 1.19.0,最终导致调试进程退出。具体报错信息如下:

GOROOT=/opt/homebrew/Cellar/go/1.19/libexec #gosetup
GOPATH=/Users/<user>/go #gosetup
/opt/homebrew/Cellar/go/1.19/libexec/bin/go build -o /private/var/folders/ws/r3lmtqdj03d3jn5l3v3t_s3w0000gn/T/GoLand/___go_build_ngraph_server_worker -gcflags all=-N -l ngraph/server/worker #gosetup
/Applications/GoLand.app/Contents/plugins/go/lib/dlv/macarm/dlv --listen=127.0.0.1:61230 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /private/var/folders/ws/r3lmtqdj03d3jn5l3v3t_s3w0000gn/T/GoLand/___go_build_ngraph_server_worker --
API server listening at: 127.0.0.1:61230
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1400.0.30.3
 for arm64.
Got a connection, launched process /private/var/folders/ws/r3lmtqdj03d3jn5l3v3t_s3w0000gn/T/GoLand/___go_build_ngraph_server_worker (pid = 84469).
WARNING: undefined behavior - version of Delve is too old for Go version 1.19.0 (maximum supported version 1.17)
<nil>
<nil>
Exiting.

Debugger finished with the exit code 0
解决方法
  • 升级GoLand版本:GoLand 2022.3及后续版本已适配Go 1.19,内置的Delve版本同步更新,可直接解决兼容性问题。
  • 手动更新Delve:
    1. 终端执行命令安装最新版Delve:go install github.com/go-delve/delve/cmd/dlv@latest
    2. 打开GoLand的Settings/Preferences > Build, Execution, Deployment > Debugger > Go,将Delve executable路径设置为$GOPATH/bin/dlv(或实际安装路径)
  • 临时降级Go版本:若暂时无法升级GoLand,可将Go版本降级至1.17,确保与内置Delve兼容,但不推荐长期使用。

内容的提问来源于stack exchange,提问作者Chris G.

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 20:30:56