• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

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

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

问题

当创建好一个 Go1 Command Project之后,我们想调试main.go时, F5 报错,如下图:

控制台提示:

=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了。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Go语言核心36讲(Go语言进阶技术十)--学习笔记发布时间:2022-07-10
下一篇:
go内存模型发布时间:2022-07-10
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap