Skip to content

Fix console output for GUI apps#88

Open
abdnh wants to merge 1 commit intobeeware:mainfrom
ankitects:console
Open

Fix console output for GUI apps#88
abdnh wants to merge 1 commit intobeeware:mainfrom
ankitects:console

Conversation

@abdnh
Copy link
Copy Markdown

@abdnh abdnh commented Apr 14, 2026

Console output for GUI apps was not working (confirmed on Windows 11).

Apparently reopening standard descriptors using freopen() after the AttachConsole() call is required.

I just copied this fix from Anki's custom launcher and confirmed it's working: https://github.com/ankitects/anki/blob/81eefc5f7128988a54ff5bb58a6b08697d1214a8/qt/launcher/src/platform/windows.rs#L135

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@freakboy3742
Copy link
Copy Markdown
Member

Can you clarify what you mean by "not working"? What's the reproduction case for this problem?

@abdnh
Copy link
Copy Markdown
Author

abdnh commented Apr 14, 2026

It's not showing any output if a GUI app is run in an existing console. This can be reproduced with the default template on Windows:

  1. Run briefcase create && briefcase package.
  2. Open a Powershell console and run the executable: & '.\Hello World.exe'
  3. Notice no output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants