Skip to content
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

can't see any logs when using #[windows_subsystem = "windows"] #290

Open
wiiznokes opened this issue Dec 29, 2023 · 4 comments
Open

can't see any logs when using #[windows_subsystem = "windows"] #290

wiiznokes opened this issue Dec 29, 2023 · 4 comments

Comments

@wiiznokes
Copy link

Maybe related: #214.

I don't know if we can do anything about it, but I just wasted 10 minutes understanding why my logs no longer worked under Windows. It might be good to mention it in the docs.

@wiiznokes
Copy link
Author

work around, while not being perfect (only working on debug target):

#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

@epage
Copy link
Contributor

epage commented Dec 30, 2023

So if I understand correctly, windows_subsystem = "windows" means no stdout / stderr is created.

Maybe I don't do enough Windows programming lately but I would assume that setting this is a fairly advanced use case, meaning

  • It would be uncommon enough that documenting might make things more confusing
  • There is a certain level of base understanding expected when using this
    • Obviously, this fails since you are here but wanting to lay out my assumptions so I can better understand why I'm wrong.

Could you help me in finding where my understanding is wrong?

@wiiznokes
Copy link
Author

I only use this so that no console pops when launching my program (i'm doing a graphical interface).
AFIK, it's the only ways to have this behavior on Windows, so every graphical program will want to use this i think. For example, i know Tauri use it in it's examples

It would be uncommon enough that documenting might make things more confusing

I understand that, it's as you want, maybe having one issue is enought

@epage epage reopened this Dec 30, 2023
@epage
Copy link
Contributor

epage commented Dec 30, 2023

Ah, guis, so this isn't just an advanced issue.

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

No branches or pull requests

2 participants