User forums > Using Code::Blocks

CodeBlocks and compiling wxWidgets Projects

<< < (2/2)

weisswurst:
Well, the -g flag is set.
And I'm starting with F8 Debug -> Start... No change it's running trough the whole programm
and I still don't see anything.

After reading the two links from Pecan I tried a console application. This more or less works.
I can run it. A terminal is opened and the textline is printed. But Breakpoints still don't work.
The only way is to use the menupoint Debug -> Step Into then i can go on step by step but
the terminal will never be opened even when I pass the line in which the textline should be
printed on screen.

Biplab:
I guess you are trying to Print some output from your wx App to Console in Debug mode.

If you are using the wizard, it sets the app to Window type. If you wish to compile your wx application in console mode, then you have to manually edit the project file created by the wizard.

Open the project file in a text editor. Then search for the the following lines.

--- Code: ---<Target title="Debug">
<Option output="bin/Debug/TestWX" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
--- End code ---

Change the last line to -

--- Code: --- <Option type="1" />
--- End code ---

This will compile ur app in Console mode.

But I've never tried this option. So I can't assure you success. :)

weisswurst:

--- Quote from: Biplab on February 12, 2007, 10:30:57 am ---I guess you are trying to Print some output from your wx App to Console in Debug mode.

--- End quote ---

No, thats wrong :)
I did the console application thing only to test debbuging in general.
In fact my plan with the wxApplication is to develop a Filebrowser because my fav. one from Windows is written in VisualBasic  :(
I want to to that with wxWidgets because I plan to use it on Linux and Windows too.

Anyway I'm very thankful for every hint.

Pecan:
If you're getting a console to pop up on Linux, then you must be using the blue triangular run button(ctrl-F10), not the grey debugger cont/run button(F8/Ctrl-F7).

Breakpoint are disabled when using the blue run button.

If you attempt to debug a linux console app that uses stdin the debugger freezes at the input statement. Currently the only way out is a killall {program name}

For the moment, linux has no debugging console or terminal. There is a patch for one, but it has not been applied as yet.

For the time  being, you can use a unix debugger called "cgdb". If you're running ubuntu, synaptic will install it for you. If some other *nix, google "cgdb".

Navigation

[0] Message Index

[*] Previous page

Go to full version