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

问题

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

F5 报错,如下图:
LiteIDE调试Go提示 No executable specified, use `target exec'_第1张图片

控制台提示:

=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 \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"
~".\n"
~"Find the GDB manual and other documentation resources online at:\n.\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了。

你可能感兴趣的:(go)