Author Topic: Console debug output with wxWidgets in debian gnu/linux  (Read 150 times)

Offline jeroglifo

  • Single posting newcomer
  • *
  • Posts: 2
Console debug output with wxWidgets in debian gnu/linux
« on: May 13, 2020, 07:20:58 pm »
Hi,
Beginner question:
Please, somebody so kind to show me how can I print debug info with cout << to a debug console? Naturally, the GUI musst run at the same time.

In other words, I would like to display a debug text in a console when I click a button.

Thanks in advance.
« Last Edit: May 13, 2020, 08:44:37 pm by jeroglifo »

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Console debug output with wxWidgets
« Reply #1 on: May 13, 2020, 07:43:10 pm »
You're probably on windows. To do so you need to switch the type of the application to console or you need to show a console manually and also attach the std streams to the console. There are plenty of places where this is explained on the internet. You can start by searching for AttachConsole.

If you're not on Windows, then you can just print to the console. Then switch the app type to console and enable the pause for exit checkbox.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jeroglifo

  • Single posting newcomer
  • *
  • Posts: 2
Re: Console debug output with wxWidgets
« Reply #2 on: May 13, 2020, 08:40:43 pm »
Hi Obfuscated. First place, thank you very much.

I am on Debian.

I can't find an example, perhaps, if somebody could attatch one... (I'm lost no idea, if I write a terminal program, the output is through xterm, but that's not the case)

Thanks in advance
« Last Edit: May 13, 2020, 08:45:15 pm by jeroglifo »

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Console debug output with wxWidgets in debian gnu/linux
« Reply #3 on: May 13, 2020, 08:50:38 pm »
Switch the project type to console and there is a pause checkbox under the type combobox. Project -> Properties -> Build targets -> your build target
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]