Page 1 of 1

Error while debug : No executable file specified, use the file or exec-file command

Posted: Thu Jan 05, 2023 7:20 am
by CoderJS001

Hi All,

I am a first time user for Codelite (using version 16.0).
I have Conan based c++ project.

Using workspace settings I am able to run my executable using Codelite.
However when I try to debug using the same sttings it gives me this errors:

No executable file specified, use the file or exec-file command

However in the workspace settings, in the general tab I have specified the path to my executable. And that is why I am able to run the code.
But in debugging I am facing issues.
In Debug tab I have have specified the path to my gdb /usr/bin/gdb , and command in startup commands I have given the command too gdb ./build/bin/app ./test/console.js

How to solve this issue ?

My sytem information:

Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal


Re: Error while debug : No executable file specified, use the file or exec-file command

Posted: Thu Jan 05, 2023 8:33 am
by CoderJS001

Ok solved it myself.
On codelite 16.0, go to Menubar > Debugger > Quick Debug

There in:

  1. Set path to your GDB
  2. Set path to your executable
  3. runtime arguments you need to pass
  4. Working directry path (the GDB will run in that path)

Re: Error while debug : No executable file specified, use the file or exec-file command

Posted: Thu Jan 05, 2023 2:14 pm
by DavidGH

Hi,

Ok solved it myself

Well, not really. You just worked-around by using a different way to call gdb.

in Debug tab I have have specified the path to my gdb /usr/bin/gdb

Good.

and command in startup commands

I've never used that field, but (assuming you need to put anything at all there) I doubt if that's what you should have entered. In particular repeating 'gdb'; I suspect the command being run started with:
/usr/bin/gdb gdb...

What I've always done is to fill in the /path/to/gbg, as you've done. But I put the rest of the info in General: Debugging. And that's normally nothing, as CodeLite uses the binary in the Executable to Run / Debug field. If there are more parameters, add them to Debug Program Arguements e.g. one of my projects currently has --datadir=/foo/bar/baz

Regards,

David