Page 2 of 2

Re: how do i debug an FFGL?

Posted: Mon Sep 02, 2019 15:32
by Menno
Visual Studio does not intercept std::cout or printf, these get sent directly to the console. To print in Visual Studio's Output window you need to use OutputDebugString. If you want consistent behaviour between Visual Studio and xcode you should use the Log function located in FFGLUtilities.h
It works a bit different than printf, there's no more format flags, you can just do this:
Log( "This is a number: ", 3.14f, " we all love pie dont we?" );

Re: how do i debug an FFGL?

Posted: Tue Sep 03, 2019 08:17
by subpixel
Daft question: how/where can one view the console output?

Re: how do i debug an FFGL?

Posted: Tue Sep 03, 2019 09:27
by Menno
Resolume targets the windows subsystem and not the console subsystem so it's not created automatically for us by windows. You'll have to dive into the console api: https://docs.microsoft.com/en-us/window ... -reference. Something involving the AllocConsole i think, i'm sure google can help you figure out how to show the console :)

Re: how do i debug an FFGL?

Posted: Wed Sep 04, 2019 01:53
by leadedge

Code: Select all

FILE* pCout;
AllocConsole();
freopen_s(&pCout, "CONOUT$", "w", stdout);
Then if you close the console you shut down the entire application. To prevent that happening accidentally you can add :

Code: Select all

EnableMenuItem(GetSystemMenu(GetConsoleWindow(), FALSE), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);

Re: how do i debug an FFGL?

Posted: Thu Oct 10, 2019 01:40
by subpixel
Thanks for the info, both of you!