I am programming an application using the command line application output type to display debug information in the console.
I would like to hide the console when compiling the application for release. Not showing the console can easily be done by going into the project properties, the application tab and change the output type to windows application.
But anyway I would like to give the user opportunity to open the application with console even in Release. For this I added Dev
button and when user click it I would like that an application open console with all debug log output.
I found such answer on SO
https://stackoverflow.com/a/7828186/5709159
And it is works, when the application in dev console also open if in Release console not open.
So, I see two possible ways
- When user in Release mode he can click on
Dev
button and console will be opened with all previous log. - Add some variable (like
DevMode
) toProperties
file, like in link above. When user in Release mode he can click onDev
button I saveDevMode = true
(in file) and user need to reload the app and open an app again, but now I can see thatDevMode == true
and according to this open the application with console even in Release mode
Question is - is it possible to do it ?