Could not launch terminal for debugger

CodeLite installation/troubleshooting forum
pmjobin
CodeLite Enthusiast
Posts: 15
Joined: Thu Mar 25, 2010 7:28 pm
Genuine User: Yes
IDE Question: C++
Contact:

Could not launch terminal for debugger

Post by pmjobin »

Hi,

I used to be able to debug applications using Codelite 5.4 under Fedora 20 x64. Now that I've updated to 6.0, whenever I press F5, there is a long pause followed by this dialog:
debugerr.png
Regards,
PMJ
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by eranif »

Please install xterm and it will be fixed

Eran
Make sure you have read the HOW TO POST thread
pmjobin
CodeLite Enthusiast
Posts: 15
Joined: Thu Mar 25, 2010 7:28 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by pmjobin »

Installing xterm fixed the problem indeed and I can now debug again. On the other hand, I preferred the behavior of previous Codelite versions in which the terminal window was embedded within the Codelite UI. Is there a way to restore this behavior? Is it possible to use another terminal such as gnome-terminal in place of xterm?

Thanks!
PMJ
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by eranif »

No. You can't
The previous terminal was lacking and missing functionality ( I got various reports about it )
So it was decided that a native terminal will be used

Eran
Make sure you have read the HOW TO POST thread
MaSydJun
CodeLite Curious
Posts: 3
Joined: Sun Dec 16, 2012 5:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by MaSydJun »

Thats very sad, since this was an awesome feature, even though it wasn't "perfect" terminal emulator.
But imo thats not what it was supposed to be. I only needed an embedded window/pane to view program output.
And it always worked perfect for me…

Is there a way to get an embedded terminal through a plugin or something?
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Could not launch terminal for debugger

Post by tankist02 »

I have the same problem - "Could not launch terminal for debugger". I do have xterm installed:

Code: Select all

$ rpm -qa|grep xterm
xterm-253-1.el6.x86_64
I have relatively recent gcc and gdb:

Code: Select all

$ gcc -v
Using built-in specs.
COLLECT_GCC=/opt/rh/devtoolset-2/root/usr/bin/gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC) 

Code: Select all

$ gdb -v
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-47.el6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
CodeLite is 7.0 beta built from sources a few days ago. Build configuration is default except -DENABLE_LLDB=0

I created a simple hello world project - and this one works, I can start debugging session. But my real project can't be debugged. I tried to delete ~/.codelite and create new configuration - didn't help.

I have another Linux machine, presumably identical to the first one - and the same CodeLite 7 Beta works beautifully there.

What else can I try to resolve this pesky problem? Would it be practical to build Debug version of CodeLite and debug it to see why launching terminal fails?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by eranif »

What do you get in the 'trace' tab? Did you confirm that codelite_xterm script exists and has execution permission?

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Could not launch terminal for debugger

Post by tankist02 »

Hi Eran,

codelite_xterm seems to be OK:

Code: Select all

$ which codelite_xterm
/usr/bin/codelite_xterm
Here is trace from machine where CL debugging works:

Code: Select all

12:15:04: Warning: Resource files must have same version number.
12:15:05: Install path: /usr/share/codelite
12:15:05: Startup Path: /home/terekhoa/.codelite
12:15:05: Using Scintilla 3.21
12:15:06: Initializing refactoring database for workspace: AalmIntegration
12:15:07: Symbols file loaded into OS file system cache (0 seconds)
12:15:14: Error: can't open file '' (error 2: No such file or directory)
12:15:16: Warning: Resource files must have same version number.
12:15:27: Initializing refactoring database for workspace: AalmIntegration... done
And here from where CL debugging doesn't work:

Code: Select all

12:06:41: Warning: Resource files must have same version number.
12:06:41: Install path: /usr/share/codelite
12:06:41: Startup Path: /home/duf/.codelite
12:06:41: Using Scintilla 3.21
12:06:43: Initializing refactoring database for workspace: AalmIntegration
12:06:44: Symbols file loaded into OS file system cache (1 seconds)
12:07:08: Initializing refactoring database for workspace: AalmIntegration... done
12:08:11: Error: can't open file '/data/duf/dev/kmv/last/Components/AALM/Products/AalmIntegration/cl/.codelite/compilation.db.txt' (error 2: No such file or directory)
12:11:10: Current working directory is reset to /data/duf/dev/kmv/last/Components/AALM/Products/AalmIntegration/cl
On both machines CL pop ups a terminal window (top-left side) with the title:

Code: Select all

Debugging: "full_path_to_my_program"
but on the working machine the following text is printed:

Code: Select all

& "warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
while on the failing machine nothing is printed in the terminal.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Could not launch terminal for debugger

Post by DavidGH »

Hi,

If you can succesfully debug a different project there can't be anything wrong with your CodeLite installation.
"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
That's a 'normal' error, and of no consequence.
12:08:11: Error: can't open file '/data/duf/dev/kmv/last/Components/AALM/Products/AalmIntegration/cl/.codelite/compilation.db.txt' (error 2: No such file or directory)
Does that filepath exist? Do you have read permissions for it?

Regards,

David
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Could not launch terminal for debugger

Post by eranif »

DavidGH wrote: 12:08:11: Error: can't open file '/data/duf/dev/kmv/last/Components/AALM/Products/AalmIntegration/cl/.codelite/compilation.db.txt' (error 2: No such file or directory)

Does that filepath exist? Do you have read permissions for it?
This is also harmless message that can be ignored and has nothing to do with debugging problems (its mostly related to code completion)

Eran
Make sure you have read the HOW TO POST thread
Post Reply