Regarding your comment that calling Thread.Sleep will hang the window after it is closed and that the window won't close when the user presses a key. That is correct, the window will only close when the user closes the window, as I said. When somebody posts an alternate to your tip/trick, that doesn't mean they are discrediting your tip/trick... it's just an alternative way of accomplishing the same thing (in this case, making the window stay open until the user decides to close it). Also, the window will not "hang" after the user closes it; that is plainly incorrect.
At minimum, one should ensure that only debug versions of the code have such a delay, but since there may sometimes be useful versions for having both debug and release versions of code run from the command line, it would be better if the behavior only occurred when running in the IDE. Not sure how to do that, though, unless one adds a extra command-line argument to the project for use when running in the IDE.
You can define your own debug symbols. You could also use a settings file (that wouldn't do conditional compilation, but you could still use it to decide what code to run).