Debugger not working

CodeLite installation/troubleshooting forum
DiscoFighter
CodeLite Curious
Posts: 7
Joined: Fri Dec 04, 2020 10:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Debugger not working

Post by DiscoFighter » Fri Dec 04, 2020 10:26 pm

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

DavidGH
CodeLite Plugin
Posts: 701
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugger not working

Post by DavidGH » Fri Dec 04, 2020 11:40 pm

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

DiscoFighter
CodeLite Curious
Posts: 7
Joined: Fri Dec 04, 2020 10:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger not working

Post by DiscoFighter » Sat Dec 05, 2020 2:31 pm

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)

DavidGH
CodeLite Plugin
Posts: 701
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugger not working

Post by DavidGH » Sat Dec 05, 2020 4:43 pm

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?

DiscoFighter
CodeLite Curious
Posts: 7
Joined: Fri Dec 04, 2020 10:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger not working

Post by DiscoFighter » Sat Dec 05, 2020 6:21 pm

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.

DavidGH
CodeLite Plugin
Posts: 701
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugger not working

Post by DavidGH » Sat Dec 05, 2020 7:55 pm

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.

DiscoFighter
CodeLite Curious
Posts: 7
Joined: Fri Dec 04, 2020 10:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger not working

Post by DiscoFighter » Sun Dec 06, 2020 3:49 pm

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.

DavidGH
CodeLite Plugin
Posts: 701
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugger not working

Post by DavidGH » Sun Dec 06, 2020 5:43 pm

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.

DiscoFighter
CodeLite Curious
Posts: 7
Joined: Fri Dec 04, 2020 10:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger not working

Post by DiscoFighter » Mon Dec 07, 2020 8:16 am

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.

DavidGH
CodeLite Plugin
Posts: 701
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Debugger not working

Post by DavidGH » Mon Dec 07, 2020 1:56 pm

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...

Post Reply