Author Topic: Capture console output and display in Code::Blocks  (Read 22731 times)

Offline JMK

  • Advanced newcomer
  • *
  • Posts: 13
Capture console output and display in Code::Blocks
« on: August 25, 2010, 01:30:07 am »
Is there a way to display the printed output from a console application in a text area in the codeblocks IDE?  It's very hard to read the console window text, long lines get split across multiple lines, and it's hard to copy and paste the text.  A text area inside the IDE where the text gets written to would be much easier to work with.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Capture console output and display in Code::Blocks
« Reply #1 on: August 25, 2010, 07:12:47 am »
Is there a way to display the printed output from a console application in a text area in the codeblocks IDE?
You can use the "Tools" menu to create an entry that calls your application (using macros to make it more generic) and then pipe the output to the C::B log.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline JMK

  • Advanced newcomer
  • *
  • Posts: 13
Re: Capture console output and display in Code::Blocks
« Reply #2 on: August 25, 2010, 08:04:03 am »
So in other words, it's not supported.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Capture console output and display in Code::Blocks
« Reply #3 on: August 25, 2010, 08:29:24 am »
So in other words, it's not supported.
Exactly not. It is supported and I've told you the way to go. :?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline JMK

  • Advanced newcomer
  • *
  • Posts: 13
Re: Capture console output and display in Code::Blocks
« Reply #4 on: August 25, 2010, 08:40:13 am »
Which forum should I post in to find someone to pay to get this done?  I have a lot of other stuff to get done and would rather pay someone else who already has that specialized knowledge.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Capture console output and display in Code::Blocks
« Reply #5 on: August 25, 2010, 08:45:26 am »
Which forum should I post in to find someone to pay to get this done?  I have a lot of other stuff to get done and would rather pay someone else who already has that specialized knowledge.
What about first looking what I am talking about? It's nothing to implement, but JUST to configure. It is already implemented. Just use it.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Peekay

  • Guest
Re: Capture console output and display in Code::Blocks
« Reply #6 on: September 08, 2010, 05:49:41 am »
Is there a way to display the printed output from a console application in a text area in the codeblocks IDE?
You can use the "Tools" menu to create an entry that calls your application (using macros to make it more generic) and then pipe the output to the C::B log.

I Know I only have one post and it's gonna sound really bad mannered of me, but would it be possible to further develop on the way to accomplish this?

I am fairly new to programming and always feel a bit uncomfortable with IDEs in general due to the overwhelming amount of features, tools and plugins. I've used Eclipse for every Java related projects and I've came to really like the console inside the IDE, which is Why I would like to accomplish the same in C::B

I've looked a bit myself and I understand the basic principle of what we're trying to accomplish with the tool (With the active project, parse all the output onto a log) but I can't come up with anything that's even close to working.

Sincerely sorry for my incompetence =)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 4471
    • My Best Post
Re: Capture console output and display in Code::Blocks
« Reply #7 on: September 10, 2010, 06:55:21 pm »
and then pipe the output to the C::B log.

Not sure how to do the piping; but here is the Wiki Page on Tools; hope this helps.

http://wiki.codeblocks.org/index.php?title=Configure_tools

Figure out the right options to do above.
Setup using option 2 "Launch tool hidden ..."

Exe: ${TARGET_OUTPUT_BASENAME}
Dir: ${TARGET_OUTPUT_DIR}

NOTE: You need to have "Code::Blocks" log open before running on at least SVN 6564 or it crashes.

Tim S.
« Last Edit: September 10, 2010, 07:17:44 pm by stahta01 »
C Programmer working to learn more about C++.
Compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org/index.php?title=Main_Page

Offline xuedi

  • Newcomer
  • *
  • Posts: 9
  • www.BeijingLUG.org
    • xuedi’s Carpe Diem LOG
Re: Capture console output and display in Code::Blocks
« Reply #8 on: November 11, 2012, 06:15:09 pm »
no sure whats the status 2 years later ^^

Would it bee easy to write a plugin that basically places the console output into the "logs & others" location?

Cheers
xuedi

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Capture console output and display in Code::Blocks
« Reply #9 on: November 11, 2012, 07:41:18 pm »
Would it bee easy to write a plugin that basically places the console output into the "logs & others" location?
It is possible (and it was always possible btw.) and it is explained in this thread, read more carefully.

What is wrong with reading these days?

I am locking this stupid topic now.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ