Author Topic: how to input to a console program in debug mode  (Read 10210 times)

Offline ahlongxp

  • Multiple posting newcomer
  • *
  • Posts: 22
how to input to a console program in debug mode
« on: October 05, 2006, 10:17:23 am »
besides that, can we add agruments when excuting program in C::B?
ubuntu 8.04
wxWidget 2.8

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5514
Re: how to input to a console program in debug mode
« Reply #1 on: October 05, 2006, 10:20:51 am »
Project menu -> Set Programs' arguments

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: how to input to a console program in debug mode
« Reply #2 on: October 05, 2006, 05:17:10 pm »
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...

Offline sque

  • Multiple posting newcomer
  • *
  • Posts: 65
Re: how to input to a console program in debug mode
« Reply #3 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. 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:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: how to input to a console program in debug mode
« Reply #4 on: October 05, 2006, 10:32:50 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.

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...

Offline ahlongxp

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: how to input to a console program in debug mode
« Reply #5 on: October 09, 2006, 04:42:35 am »
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

  • Guest
Re: how to input to a console program in debug mode
« Reply #6 on: November 13, 2006, 08:19:55 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


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: how to input to a console program in debug mode
« Reply #7 on: November 13, 2006, 10:55:26 pm »
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...)

elindio

  • Guest
Re: how to input to a console program in debug mode
« Reply #8 on: November 14, 2006, 07:07:47 pm »
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.