LiteIDE调试Go提示 No executable specified, use `target exec'

问题

当创建好一个 Go1 Command Project之后,当我们想调试main.go时, 进行以下配置:
liteIDE工具栏 编译(B) ---- > 编译配置 ---- > 自定义
将BUILDARGS 值设置为 -gcflags "-N -l"

F5 报错,如下图:
go debugger error

控制台提示:

=thread-group-added,id="i1"
~"GNU gdb (GDB) 7.7\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-w64-mingw32\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\"...\n"
&"\"D:/work_go/src/demo/demo.debug.exe\": not in executable format: Invalid operation\n"
(gdb) 
&"set unwindonsignal on\n"
=cmd-param-changed,param="unwindonsignal",value="on"
10000001^done
(gdb) 
&"set overload-resolution off\n"
=cmd-param-changed,param="overload-resolution",value="off"
10000002^done
(gdb) 
&"handle SIGSEGV nopass stop print\n"
~"Signal        Stop\tPrint\tPass to program\tDescription\n"
~"SIGSEGV       Yes\tYes\tNo\t\tSegmentation fault\n"
10000003^done
(gdb) 
&"set breakpoint pending on\n"
=cmd-param-changed,param="breakpoint pending",value="on"
10000004^done
(gdb) 
&"set width 0\n"
=cmd-param-changed,param="width",value="4294967295"
10000005^done
(gdb) 
&"set height 0\n"
10000006^done
(gdb) 
&"set auto-solib-add on\n"
10000007^done
(gdb) 
&"Warning: D:/software/Go/src/pkg/runtime: No such file or directory.\n"
10000008^done,source-path="D:/software/Go/src/pkg/runtime;$cdir;$cwd"
(gdb) 
&"set substitute-path /go/src/pkg/runtime D:/software/Go/src/pkg/runtime\n"
10000009^done
(gdb) 
10000010^error,msg="No executable specified, use `target exec'."
(gdb) 

调试输出提示:

Program exited with code 0
./gdb64.exe --tty=\\.\pipe\liteide-33608-9100 --interpreter=mi --args  D:/work_go/src/demo/demo.debug.exe [D:/work_go/src/demo]
BFD: D:\work_go\src\demo\demo.debug.exe: unable to initialize decompress status for section .zdebug_abbrev

解决办法

工具栏 调试(D) -----> 选中 debugger/delve
将debugger 从 gdb 切换成 delve 就可以正常debug了。

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值