User forums > Using Code::Blocks

No console output window while debugging console app on Mac OS X

(1/5) > >>

edwin:
Hello,

If I may, I would like to ask for help in getting a console window displayed while debugging a simple console app on OS X.


More info…

I am developing a console application (driver app) that is used to test/verify a Window/Linux/OS X porting package I am developing for a VOIP project.

The porting package and the console app development is going well. I use CodeBlocks SVN 6215 (built from the sources) on Mac OS X Snow Leopard 10.6.3.

Question 1:
Is it possible while debugging to get a console output window displayed?

I searched this forum to see if I was missing some simple configuration setting. I did see the following post:

Console app run/debugging for MacOSX:
http://forums.codeblocks.org/index.php?topic=4608.0

…but I still am not able to get the debugged console app’s console window displayed while debugging. Hmmm… strange….

I am aware of the settings in the “Setting->Environment dialog named:

“Shell to run command in:”
“Terminal to launch console programs:”


They are currently set to:

/bin/sh -c
osascript -e 'tell app "Terminal" to do script "$SCRIPT"'

It is probably some simple error I am making that is causing the apps console window to not display while I am debugging but I can’t seem to figure it out.


Thank you for your help,

edwin


oBFusCATed:
Do you see the console when you hit the run button?
If yes, can you provide the debugger's debug log!

This log is shown by going to Settings -> Compiler & Debugger -> Debugger -> Display debugger's log...

Also you should check if you debugger (gdb from apple probably) supports the tty command...
C::B should have executed the:
> tty /dev/pts/2

edwin:
Hi oBFusCATed,

Thank you for your quick reply.

I do not see the console when I hit the run button (when I run the consol app target using CodeBlocks).

Other than the console window not being displayed, everything else seems normal for the debug sessions.

I can get you whatever info you might need if you can help…


edwin


edwin:
Hi oBFusCATed,

I enabled the debugger log and ran the console app within the debugger again…

The log was generated but I do not see any tty “gdb commands”… should I?



Other Info:

Here is the result of “gdb –version”:

GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar  5 04:43:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".


Looks like gdb supports the –tty command line switch. Here is some of the text of “man gdb” from the Mac box:

SYNOPSIS
       gdb    [-help] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] [-tty=dev] [-s symfile]
   [-e prog] [-se prog] [-c core] [-x cmds] [-d dir] [prog[core|procID]]



edwin

afb:

--- Quote from: edwin on June 04, 2010, 08:52:44 pm ---I am aware of the settings in the “Setting->Environment dialog named:

“Shell to run command in:”
“Terminal to launch console programs:”


They are currently set to:

/bin/sh -c
osascript -e 'tell app "Terminal" to do script "$SCRIPT"'

--- End quote ---

The default setting is:

--- Code: ---osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "$SCRIPT"' -e 'end tell'

--- End code ---

The only difference is that it also tells it to "activate",
i.e. bring the window to the front.

It should still have launched, just in the background...


--- Quote ---It is probably some simple error I am making that is causing the apps console window to not display while I am debugging but I can’t seem to figure it out.

--- End quote ---

In the build log you should have a line like "Executing:"

You could try running that yourself, in a Terminal window.

Navigation

[0] Message Index

[#] Next page

Go to full version