idea中debug Go程序报错error layer=debugger could not patch runtime.mallogc

一、问题场景

在idea中配置了Go编程环境,可以运行Go程序,但是无法debug,报错error layer=debugger could not patch runtime.mallogc: no type entry found, use 'types' for a list of valid types

二、解决方案

这是由于idea中使用的dlv.exe版本太老导致,直接在终端中执行如下命令安装最新版dlv.exe

bash 复制代码
go install github.com/go-delve/delve/cmd/dlv@latest

这会将dlv.exe安装到个人所设置的GOPATH目录下的bin目录中

打开idea的Help->Edit Custom Properties,添加一下dlv.exe的路径,然后重启idea即可


参考:https://stackoverflow.com/questions/75585793/version-of-delve-is-too-old-for-go-version-1-20-0-maximum-supported-version-1-1

相关推荐
苦学编程的谢13 小时前
Maven
java·maven·intellij-idea
Bella_chene14 小时前
IDEA中无法使用JSP内置对象
java·servlet·intellij-idea·jsp
不老刘15 小时前
基于LiveKit Go 实现腾讯云实时音视频功能
golang·腾讯云·实时音视频
Percep_gan18 小时前
idea的使用小技巧,个人向
java·ide·intellij-idea
好奇的菜鸟1 天前
如何在IntelliJ IDEA中设置数据库连接全局共享
java·数据库·intellij-idea
简佐义的博客1 天前
破解非模式物种GO/KEGG注释难题
开发语言·数据库·后端·oracle·golang
荔枝吻1 天前
【沉浸式解决问题】idea开发中mapper类中突然找不到对应实体类
java·intellij-idea·mybatis
恋喵大鲤鱼1 天前
Golang 运算符
golang·运算符
weixin_437398211 天前
转Go学习笔记(2)进阶
服务器·笔记·后端·学习·架构·golang