Skip to content

Windows does not log to stdout/stderr when app is launched from a terminal with Console=False #8973

Answered by rokm
C0rn3j asked this question in Help
Discussion options

You must be logged in to vote

Windows does not log to stdout/stderr when app is launched from a terminal with Console=False

The application is supposed to log to STDOUT and STDERR, but it never does, powershell just instantly returns when launching the app.

Executables built with /SUBSYSTEM:WINDOWED do not have console attached, even if you launch them from console. Similarly, they launch in the background w.r.t. to the console that you launched them from, hence the "instant return".

Is there no way to build the application in both modes, and perhaps at least only execute the logging one with some additional -console parameter?

Short of building two executables - one with console=True and one with console=False (s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@C0rn3j
Comment options

Answer selected by C0rn3j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants