gpt4 book ai didi

debugging - 戈格兰 : debugging is grayed out

转载 作者:IT王子 更新时间:2023-10-29 01:38:45 26 4
gpt4 key购买 nike

我似乎无法让调试器运行。调试运行图标变灰,菜单选项丢失。

Toolbar

这只是main的情况,我可以很好地调试单元测试。

类似的问题提到了项目结构,但我看不出有什么不对:

$GOPATH/src/foo.bar.com/some/more/dirs/
project/ <-- this directory is opened in Gogland
app1/
main.go
app2/
main.go
mylib/
abc.go
abc_test.go

我可以右键单击 abc_test.go 并在调试或不调试的情况下运行它,但是如果我右键单击其中一个 main.go 文件,我只能运行它。

运行配置:

run configuration

戈格兰内部版本 162.12024.32

最佳答案

Go Single File 目前不支持调试。如果这样的运行配置处于事件状态,则必须创建一个新的。新的类型必须是 Go Application。

要创建 Go 应用程序运行配置,您还可以选择:在出现选项时从菜单中构建并运行 ...。

同时将当前事件的运行配置从 Go 单个文件更改为 Go 应用程序将解决问题。

关于debugging - 戈格兰 : debugging is grayed out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42752485/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com