News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

how to input to a console program in debug mode

Started by ahlongxp, October 05, 2006, 10:17:23 AM

Previous topic - Next topic

ahlongxp

besides that, can we add agruments when excuting program in C::B?
ubuntu 8.04
wxWidget 2.8

killerbot


mandrav

What do you mean? If you debug a console program, a console is launched for it. Just switch to that console and type away...
Be patient!
This bug will be fixed soon...

sque

I am having same problem, but I thought it was my problem. At linux the debug doesn't pop-up a console window. But the program runs in the background.

(Am I so unlucky that I am always aware of all the bugs? Or the linux version is not paied so much attention? I wish I could help giving patches... :( )
Tell me a bug and I 'll tell you two  :twisted:

mandrav

Quote from: sque on October 05, 2006, 05:21:59 PM
I am having same problem, but I thought it was my problem. At linux the debug doesn't pop-up a console window.

That's true.

Quote from: sque on October 05, 2006, 05:21:59 PM
Or the linux version is not paied so much attention? I wish I could help giving patches... :( )

It's not a matter of attention. Just like I can't make gdb stop by using the "Stop" button in windows, I can't make a new console for debugging in linux. Patches are always welcome :).
Be patient!
This bug will be fixed soon...

ahlongxp

Quote from: sque on October 05, 2006, 05:21:59 PM
At linux the debug doesn't pop-up a console window. But the program runs in the background.
This is what I mean.
ubuntu 8.04
wxWidget 2.8

elindio

Quote from: ahlongxp on October 09, 2006, 04:42:35 AM
Quote from: sque on October 05, 2006, 05:21:59 PM
At linux the debug doesn't pop-up a console window. But the program runs in the background.
This is what I mean.

I've just downloaded the Linux version of Code::Blocks for my laptop. It is really useful!
It would be great having the console window when we are in debug mode as in the
Windows version.

When debugging programs with lines asking for an input,  that is a real problem. We
do not have any interaction with the program.

Thanks a lot!

elindio


dmoore

As a short term fix, can you just use "Debug -> Send user command to debugger" to send your input? (I'm assuming gdb will just pass this information onto your program if they share the same stdin, but maybe not...)
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

elindio

Actually I can't...

When the program is waiting for the input, the button "Debug->Send user command to debugger" is disabled.

Whenever that button is enabled is to send some command to gdb,... but it does not work for the inputs.

Thanks though.