diff --git a/source/application/StarMainApplication.hpp b/source/application/StarMainApplication.hpp index 18c9fa5..5ba06e7 100644 --- a/source/application/StarMainApplication.hpp +++ b/source/application/StarMainApplication.hpp @@ -18,6 +18,10 @@ namespace Star { LPWSTR* argsList = CommandLineToArgvW(GetCommandLineW(), &nArgs); \ Star::StringList args; \ for (int i = 0; i < nArgs; ++i) args.append(Star::String(argsList[i])); \ + if (IsDebuggerPresent() && AllocConsole()) { \ + freopen("CONOUT$", "w", stdout); \ + freopen("CONOUT$", "w", stderr); \ + } \ return Star::runMainApplication(Star::make_unique(), args); \ }