News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Have GDB run in terminal?

Started by pubby8, August 18, 2011, 02:09:30 AM

Previous topic - Next topic

pubby8

On windows when I start the debugger, it opens a CMD window and shows the output there.
On linux, it displays it on the "logs" section, however I would like to have it open in a new terminal window.

How can I do this? Thanks.

oBFusCATed

Install xterm or search the forum how to setup gnome-terminal as your terminal
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

pubby8

I already got xfce terminal to work - it just isn't working for the debugger.

oBFusCATed

Build->Run shows your terminal, but Debug->Start doesn't?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

pubby8

Build->Run opens a terminal and displays "hello world"
Debug->Start displays "hello world" in the debugger tab of the logs & others window. I want it to open a terminal instead.

Jenna

Please check the settings in "Project -> Properties -> Build targets -> [theTarget] -> Type".
If it is not console application, it will not work.

If it is correct, please turn on the debuggers debug log  in "Settings -> Compiler and debugger -> Debgger settings" and post the content here (in code-tags).

pubby8


oBFusCATed

Right click -> copy selection or copy all
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Somewho

Hi. First of all, I'm new to Linux :)
I have Zenwalk 7.0 with XFCE, and I've installed Code::Blocks. I switched my terminal from Xorg's "xterm" to XFCE's "terminal". But it wasn't easy to resolve the same problem, as topicstarter's.
All works fine after I changed terminal command from "terminal --title=$TITLE -x" to just "terminal -x". Debugger's terminal wasn't launching just because he hadn't title. Is it planned or what?
I'm posting this just because it can be helpful for some linux novice like me :)

oBFusCATed

So the problem is that $TITLE is empty?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Somewho

It's not 100% true to say that problem is in $TITLE. When I used xterm, it correctly uderstood $TITLE for debug also. But I had ^H there :)
Maybe it's a problem with XFCE's terminal. I don't know exactly.

Jenna

#11
The different terminals do not share the same commandline arguments.
I don't remember the correct settings for xfce-terminal, because I finally switched to gnome 3 and have removed xfce completetly.

Somewho

Quote from: jens on October 28, 2011, 06:27:12 AM
The different terminals do not share the same commandline arguments.
Yes, I know. But why line "terminal --title=$TITLE -x" works with "Run" and crashes "Debug"? Parameters are same. As far as I know, something wrong (incompatible with xfce's terminal) with debug's $TITLE.

oBFusCATed

Does "terminal --title=Test -x sleep 10000" works?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Somewho

#14
Quote from: oBFusCATed on October 28, 2011, 04:28:37 PM
Does "terminal --title=Test -x sleep 10000" works?
It won't work because after "-x" should be adress of executable file to run into terminal. And I haven't fount any analogs for "sleep" option in "terminal -h".

Oh, sorry :) Now I understand what your command means. If I choose "Run", it shows no error, but process exits after 1 sec. And if I choose "Debug", it's running till 1st console input command and waiting while user will enter something. But there is no windows to enter data.