Page 1 of 2
Debugger not working
Posted: Fri Dec 04, 2020 10:26 pm
by DiscoFighter
Greetings!
So I am new to Codelite and I am having trouble with debugging.
Everytime I try to debug my code a message pops up that says :
[ Debugger exited with the following error string:
"No executable specified, use 'target exec'." ]
Please help me to identify what's wrong with the IDE and guide me to what I should to get rid of this error.
Thank You
Re: Debugger not working
Posted: Fri Dec 04, 2020 11:40 pm
by DavidGH
Hi,
Which OS? Which compiler? Which ${AnythingElseRelevant}?
A search of the forum for 'No executable specified, use 'target exec'' returned 40 results. The first 2 are
viewtopic.php?f=3&t=4315 and
viewtopic.php?f=11&t=4161. It would be worth looking at those and more.
Regards,
David
Re: Debugger not working
Posted: Sat Dec 05, 2020 2:31 pm
by DiscoFighter
Greetings David!
Thank you for the reply. Like you mentioned I checked earlier posts for similar problems but couldn't find a solution.
As for info regarding the error:
OS - Windows 10
Compiler - Codelite IDE
Build Output :
C:\WINDOWS\system32\cmd.exe /C ""C:/Program Files/mingw-w64/mingw64/bin/mingw32-make.exe" -j8 SHELL=cmd.exe -e -f Makefile"
"----------Building project:[ Debugger - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/CPP/Sec12/Debugger'
"C:/Program Files/mingw-w64/mingw64/bin/g++.exe" -o Debug/Debugger @"Debugger.txt" -L. -static
mingw32-make.exe[1]: Leaving directory 'C:/CPP/Sec12/Debugger'
====0 errors, 0 warnings====
When I go to Workspace -> Open Active Project Settings -> General -> Executable to Run/Debug , it is set to the value $(OutputFile)
Re: Debugger not working
Posted: Sat Dec 05, 2020 4:43 pm
by DavidGH
OS - Windows 10
...which make me the wrong person to ask, as I use Linux. Still:
When I go to Workspace -> Open Active Project Settings -> General -> Executable to Run/Debug , it is set to the value $(OutputFile)
What does $(OutputFile) contain? Does that file exist? If so, what happens if you run/debug it in a terminal? Does it work there?
Re: Debugger not working
Posted: Sat Dec 05, 2020 6:21 pm
by DiscoFighter
Like I said I am new to the IDE, hence I don't know what $(OutputFile) means or what it contains.
The program runs fine though. It's the debugger that refuses to work.
Re: Debugger not working
Posted: Sat Dec 05, 2020 7:55 pm
by DavidGH
I don't know what $(OutputFile) means or what it contains.
Open the Project Settings dialog and look at the contents of General > Build: Output file. That's what $(OutputFile) will contain.
But as the program does
run OK, that's not going to be the problem. As gh_origin1 suggested, check your debugger settings,. Also see what happens if you try to
debug the program in a terminal.
Re: Debugger not working
Posted: Sun Dec 06, 2020 3:49 pm
by DiscoFighter
The Debugger settings seem to be fine. It's set to GNU gdb debugger.
I don't know what debug in a terminal means.
Also, thank you for the kind responses people.
Re: Debugger not working
Posted: Sun Dec 06, 2020 5:43 pm
by DavidGH
The Debugger settings seem to be fine. It's set to GNU gdb debugger.
And is gdb actually installed?
I don't know what debug in a terminal means.
By 'terminal' I mean somewhere to enter commands without using a GUI. For you that probably means
https://en.wikipedia.org/wiki/Windows_Terminal.
You need to work out what command CodeLite is trying to run, and try running that in the terminal.
Another thing to try first, if it's possible on Windows: turn on 'Settings > GDB Settings > Misc: Enable full debugger logging'. That might give you more useful output.
Re: Debugger not working
Posted: Mon Dec 07, 2020 8:16 am
by DiscoFighter
Yes, I checked and found that gdb installed.
By the way when I select Debug -> Quick Debug there is a columnn which says Select Executable.
But when I enter the path for the gdb or the file that I want to debug in it, it still shows "No executable specified".
I seriously don't understand what to do now.
Re: Debugger not working
Posted: Mon Dec 07, 2020 1:56 pm
by DavidGH
I seriously don't understand what to do now.
Nor do I. All I can think of is for you to attach here a zip of your Project. I'll proof-read it, and try to test it; but as I'm using Linux...