As some have already pointed out, Zoidbergs solution does not attach the debugger, which is something you usually don't want.
The best option imo is to configure your VS accordingly (from VS 2017 onwards), by going to Tools > Options > Debugging > General. There you uncheck "Automatically close the console when debugging stops" (at the very bottom), which is probably checked in your case.