golang调试器停在空行 - 为什么? [英] golang debugger stops on empty lines - why?

查看:133
本文介绍了golang调试器停在空行 - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IntelliJ Go调试器Goland。我试着做一个运行build.go clean ,后面跟着一个运行build.go build ,然后 ./ pkg / cmd / grafana-server / debug ,但是我仍然让我的调试器停留在奇怪的地方,即空行:





Go调试器在空白行上的分配是什么,我该如何纠正它?

解决方案

您是使用 go run 自己构建二进制文件在这个问题上?如果是这样,请切换到IDE并使用内置的运行配置工具并从那里启动调试会话。如果问题仍然存在,请升级到Go 1.10.1或更高版本,并确保您使用的是GoLand 2018.1.1或更新版本。如果这仍然发生,请在官方跟踪器 https://youtrack.jetbrains.com/issues / Go ,因为需要记录日志,这并不容易在那里分享。


I'm using Goland, the IntelliJ Go debugger. I've tried doing a go run build.go clean followed by a go run build.go build, and then ./pkg/cmd/grafana-server/debug, however I still get my debugger stopping in weird places, namely, blank lines:

What causes the Go debugger to break on blank lines, and how can I correct it?

解决方案

Are you building the binary yourself using go run as described in the issue? If so, please switch to the IDE and use the built-in Run Configuration tools and launch a debug session from there. If the issue still happens, then please upgrade to Go 1.10.1 or newer, and make sure you are using GoLand 2018.1.1 or newer. If this still happens, please open an issue on the official tracker https://youtrack.jetbrains.com/issues/Go as logs are needed and this is not easy to share there.

这篇关于golang调试器停在空行 - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆