To stop a program you are debugging before it has run to completion, click the Stop tool button.
When a program being debugged has run to completion, its console window closes and the debugger terminates.