When running console programs from Visual Studio, the console shows, program runs and then console disappears without giving you a chance to see it.
In general, I add those lines before main's return statement:
std::cout << "Press enter to exit " << std::endl;
std::string sGot;
getline(std::cin, sGot);
How can I do something similar when program is compiled with boost::unit_test framework? As the main is directly part of the boost library, I can't modify it (I'd like to avoid recompiling boost for that).

You can add a test that is dedicated to this purpose and is always run last.
Edit (completed by jpo38):