Although I'm not a great Linux fan, I often find myself building Windows apps that were originally written for Linux. The code is usually sprinkled with printf() statements and the like which can occasionally be useful at run time.

One of the nicer features of Linux is that apps aren't tied to being either a console app or a GUI app. If you double-click an app's icon it launches as a GUI app. However, if you open a terminal and launch the app from that, you'll see the GUI app but also see its console output.

AFAIK this isn't easy to achieve on Windows. Whether or not an app has a console is a build time decision, not a run time decision. So if you specify System:Console you'll always get a console, no matter how you launch the app. OTOH if you specify System:Windows you'll never see any console output, not even if you launch from a terminal.

The Linux approach is superior IMHO. Anyone know of any tricks for emulating it in a Windows app?