I have a Rust project I'm currently working on and I frequently have to debug and deploy it. While it's deployed it runs in the background without a window but when I'm debugging I want a window to see if there are any runtime errors.
I currently use #![windows_subsystem = "windows"] and comment it out whenever I'm debugging, but is there a way for the program itself to check if it's in debug mode so it doesn't use that flag?