dpecb06062 2017-03-12 20:08
浏览 47
已采纳

Gogland:调试显示为灰色

I can't seem to get the debugger to run. The debugging run icon is grayed out and the menu options are missing.

Toolbar

This is only the case for main, I can debug unit tests just fine.

Similar questions mention the project structure, but I can't see anything wrong:

$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

I can right click on abc_test.go and run it with or without debugging, but if I right click on one of the main.go files, I can only run it.

Run configuration:

run configuration

Gogland build 162.12024.32

  • 写回答

1条回答 默认 最新

  • doubi7496 2017-03-18 21:05
    关注

    Go Single File does not currently support debugging. If such a Run Configuration is active then a new one must be created. The type for the new one must be Go Application.

    To create a Go Application Run Configuration you can also choose: Build and run ... from the menu when presented with the option.

    Also changing the current active Run Configuration from a Go Single File to a Go Application one will fix the problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了