Log In  

Hey!
I assume that the printh() command on windows outputs text directly to Console(CONOUT$ a console's active screen buffer), thus bypassing STDOUT and STDERR. (Correct me if I am wrong)
I think it would be better to output to STDOUT or STDERR, because Console isn't a stream and can't be redirected. (For example to pipe the output into another program).

P#32434 2016-11-13 08:39 ( Edited 2016-11-15 19:18)

A good point. It'd be nice if there were a command line option to select stdout, stderr, or OutputDebugString().

In the meantime you could use sysinternals' DebugView as a stopgap, since it can capture OutputDebugString() to a file:

https://technet.microsoft.com/en-us/sysinternals/debugview.aspx

P#32436 2016-11-13 10:19 ( Edited 2016-11-13 15:19)

Zep mentioned PICO-8 uses SDL_Log() for debuggin on windows.It seems that SDL_log() does indeed log to the console screen buffer and the debug stream.

I have no clue about programming on windows, but it seems it would be possible to use the Win32-API to write to STDOUT instead.
Something like that is described here:
http://www.boku.ru/2016/02/28/posting-to-console-from-gui-app/

P#32517 2016-11-15 14:18 ( Edited 2016-11-15 19:18)

[Please log in to post a comment]