How to make Visual Studio Pause after executing a console app in debug mode?

Posted by Jason Dagit on Stack Overflow See other posts from Stack Overflow or by Jason Dagit
Published on 2008-10-11T00:30:31Z Indexed on 2010/03/13 23:25 UTC
Read the original article Hit count: 403

I have a collection of boost unit tests I want to run as a console application.

When I'm working on the project and I run the tests I would like to be able to debug the tests and I would like to have the console stay open after the tests run.

I see that if I run in release mode the console window stays up after the program exits, but in debug mode this is not the case.

I do not want to add 'system("pause");' or any other hacks like reading a character to my program. I just want to make Visual Studio pause after running the tests with debugging like it would if I were running in release mode. I would also like it if the output of tests were captured in one of Visual Studio's output windows but that also seems to be harder than it should be.

How can I do this?

Thanks!

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about console