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).
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
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/
[Please log in to post a comment]