Page 1 of 1

[12.0][Manjaro Linux] Could not launch terminal for debugger

Posted: Tue Mar 20, 2018 10:08 pm
by SC555
Sorry, I did not include all relevant information in the first iteration of this post. I'm having the "Could not launch terminal for debugger" issue, and I've checked on all the solutions I could find online.

Codelite version 12.0
Self-compiled
Linux x64 4.14.27-1-MANJARO
GCC 7.3
GDB 8.1

I have already confirmed:
codelite_xterm runs from console
codelite-terminal runs from console
gdb path is set
/usr/bin is in PATH environment variables
makefile is set to default

I tried wiping codelite settings and reconfiguring because I clicked "use Codelite's built-in terminal emulator" and could not uncheck it.
I tried both adding the debugger path in the project settings, and leaving it blank to use the default.
The result was the same.

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Wed Mar 21, 2018 10:58 am
by eranif
Can you try and install xterm?

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Wed Mar 21, 2018 3:49 pm
by DavidGH
Hi,

You might (I don't know Manjaro) also need to configure x-terminal-emulator to default to xterm, or some other terminal that CodeLite can use e.g. konsole.

What is the current result of doing, in a terminal:
x-terminal-emulator
Does a terminal launch? If so, which?

Regards,

David

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Sat Mar 24, 2018 3:22 am
by SC555
I do have xterm installed. I tried that first in codelite_xterm, when it didn't work from within codelite, I switched codelite_xterm to use xfce4-terminal. Either one opens just fine if I run codelite_xterm from console.

Should I add a shell script for "x-terminal-emulator"? I don't have one, and only see it mentioned in original codelite_xterm, where I replaced the if/else/fi statement first with

Code: Select all

terminal="xterm -sb -sl 1000"
Then with

Code: Select all

terminal="xfce4-terminal"
Either one of those runs just fine if I type in

Code: Select all

codelite_xterm "Test" gdb
Manjaro is Arch-based, so whatever I need to do should be roughly the same as anyone using Arch and XFCE.

I did notice that when I run it, I see:

Code: Select all

GNU gdb (GDB) 8.1
Copyright (C) 2018 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) 
But codelite's trace says:

Code: Select all

18:24:58: Loaded debugger: GNU gdb debugger, Version: v2.0

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Sat Mar 24, 2018 2:55 pm
by DavidGH
Should I add a shell script for "x-terminal-emulator"?
No, it's just a way (mostly on debian-based distros) to choose a sensible terminal.

Let me just check I understand what is happening: if you run codelite_xterm by hand with suitable parameters, it successfully loads gdb 8.1. Yet running the same codelite_xterm, presumably with the same parameters, from inside CodeLite fails to launch the terminal? If so, I suggest you try adding some debugging code to codelite_xterm to output what parameters it's receiving and what it's trying to do with them. That will also confirm that the correct codelite_xterm is being found.

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Sun Mar 25, 2018 2:35 am
by SC555
DavidGH wrote:
Should I add a shell script for "x-terminal-emulator"?
No, it's just a way (mostly on debian-based distros) to choose a sensible terminal.

Let me just check I understand what is happening: if you run codelite_xterm by hand with suitable parameters, it successfully loads gdb 8.1. Yet running the same codelite_xterm, presumably with the same parameters, from inside CodeLite fails to launch the terminal? If so, I suggest you try adding some debugging code to codelite_xterm to output what parameters it's receiving and what it's trying to do with them. That will also confirm that the correct codelite_xterm is being found.
I assume it is the same codelite_xterm, since it's set to /usr/bin/codelite_xterm '$(TITLE)' '$(CMD)', which is the one that I edited and the one that runs when I enter it from a terminal emulator.

Before I get too far into this, is there a way to uncheck that "use codelite's internal terminal" box? Since I tried clicking that once, now I've been manually backing up my config, relaunching codelite and redoing the settings I need when I want to try launching it from inside Codelite, then switching back to the old config to work so I don't have to mess with the other parts like the formatting settings.

Re: [12.0][Manjaro Linux] Could not launch terminal for debu

Posted: Sun Mar 25, 2018 11:02 am
by DavidGH
Before I get too far into this, is there a way to uncheck that "use codelite's internal terminal" box?
Well, you could update to the latest CodeLite git version ;) : see https://github.com/eranif/codelite/commit/2c9fe135.

But there's no need to alter the setting: either way, debugging uses codelite_xterm.