Mac Goland dlv 升级
- 问题表现
zsh
WARNING: undefined behavior - version of Delve is too old for Go version 1.22.1 (maximum supported version 1.21)
- 查看当前Goland dlv 版本
zsh
☁ ~ /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv version
Delve Debugger
Version: 1.21.0
Build: 2d3fd35e0400f2dcb54721a1705dae00c7d3b9b
- MAC 安装最新版delve
-
升级delve版本
zshbrew install delve
-
查看安装版本
zsh# dlv version /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv version Delve Debugger Version: 1.21.0 Build: 2d3fd35e0400f2dcb54721a1705dae00c7d3b9bd
-
查看二进制位置
zsh☁ ~ where dlv /usr/local/bin/dlv /usr/local/bin/dlv
-
复制dlv 到goland
zshcp -f /usr/local/bin/dlv /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv
-
验证
zsh
☁ ~ /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv version
Delve Debugger
Version: 1.21.0
Build: 2d3fd35e0400f2dcb54721a1705dae00c7d3b9bd
6.重启goland,debug 正常
zsh
API server listening at: 127.0.0.1:55379
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-1600.0.39.3
for x86_64.
Got a connection, launched process /Users/liuyunlong/Library/Caches/JetBrains/GoLand2023.2/tmp/GoLand/___go_build_github_com_gagliardetto_solana_go_cmd_slnc (pid = 82037).