Is there an OS or user-account level modification for windows 7 that I can use to leave the console window of terminated processes open?
Background: I like to use console programs for simple tests. These things tend to need debugging and analysis, and the easiest way to do that is to use printf
or equivalent - that's available in pretty much any language. Unfortunately, when a console program terminates, the window containing the text buffer exits - and I lose that simple feedback.
When you start a program from within Visual Studio (without debugging), however, Visual studio manages to start the program and leaves the console window open after the process terminates - that behavior is handy! Unfortunately, I can't start all processes from visual studio.
So, is there a way to start all programs or at least some programs such that their console window remains open until I close it rather than until the process exits? I'm dreaming of some really simple tool (or registry setting) to make windows a bit more suitable for simple development tasks.
Two specific cases: starting freshly compiled programs from a batch file (a simple unit test, essentially), and starting programs via explorer or some other external app (i.e. without being able to pass parameters).
Further Requirements: Ideally, any solution should work regardless of the console program started; in particular it should not depend on the language or runtime of the program, and it should not require changes to programs started or as few as possible.
In particular: I can always redirect output to a logfile, so I'm looking for something that's simpler than that; i.e. does not require maintaining filenames and managing files. Something you could use without hassle several times a minute and with multiple parallel processes. Pausing at the end of execution is a workaround that requires a code change and will break other callers of that process (since the process never terminates), so it's hardly better than logfiles and not always usable.