New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No console output for Windows when run from Visual Studio #53169
Comments
I dug into this a bit. When we create a console we need to freopen stdout/stderr not only in the runner, but in the engine--I believe because we are using static CRT linking. Adding it in the runner is easy since we already know when we are creating the console. The engine side will need a bit more logic since we need to know when we should be doing it; I believe the Chromium output redirection code will be useful model in getting that right. |
As a temporary workaround to show all output, replace this line in main.cpp
with
|
When creating a console on Windows, stdout/stderr aren't wired up to it. They need to be re-opened afeter the console is created, and that needs to be done separately in the engine due to the use of static runtime linking. This provides a helper method that the runner can call when creating a console so that output will work as expected. Part of flutter/flutter#53169
When creating a console on Windows, stdout/stderr aren't wired up to it. They need to be re-opened afeter the console is created, and that needs to be done separately in the engine due to the use of static runtime linking. This provides a helper method that the runner can call when creating a console so that output will work as expected. Part of flutter/flutter#53169
Redirects stdout/stderr in the Windows template when creating a console. This fixes the console opened when running from Visual Studio to actually show output, instead of being empty. Fixes #53169
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When running under the VS debugger, I'm getting a console window, but nothing shows up in it:
In theory there's code in the runner that is supposed to handle this (which is why the console window opens in the first place), but it's not working for me (and I'm not sure if it ever actually worked).
The text was updated successfully, but these errors were encountered: