• <tfoot id='clL6b'></tfoot>
      <legend id='clL6b'><style id='clL6b'><dir id='clL6b'><q id='clL6b'></q></dir></style></legend>

          <bdo id='clL6b'></bdo><ul id='clL6b'></ul>

        <small id='clL6b'></small><noframes id='clL6b'>

      1. <i id='clL6b'><tr id='clL6b'><dt id='clL6b'><q id='clL6b'><span id='clL6b'><b id='clL6b'><form id='clL6b'><ins id='clL6b'></ins><ul id='clL6b'></ul><sub id='clL6b'></sub></form><legend id='clL6b'></legend><bdo id='clL6b'><pre id='clL6b'><center id='clL6b'></center></pre></bdo></b><th id='clL6b'></th></span></q></dt></tr></i><div id='clL6b'><tfoot id='clL6b'></tfoot><dl id='clL6b'><fieldset id='clL6b'></fieldset></dl></div>

        在调试模式下执行控制台应用程序后,如何让 Visual Studio 暂停?

        How do I make Visual Studio pause after executing a console application in debug mode?(在调试模式下执行控制台应用程序后,如何让 Visual Studio 暂停?)
          <bdo id='2ammi'></bdo><ul id='2ammi'></ul>

              <tfoot id='2ammi'></tfoot>
                <tbody id='2ammi'></tbody>
                <legend id='2ammi'><style id='2ammi'><dir id='2ammi'><q id='2ammi'></q></dir></style></legend>

                <small id='2ammi'></small><noframes id='2ammi'>

                  <i id='2ammi'><tr id='2ammi'><dt id='2ammi'><q id='2ammi'><span id='2ammi'><b id='2ammi'><form id='2ammi'><ins id='2ammi'></ins><ul id='2ammi'></ul><sub id='2ammi'></sub></form><legend id='2ammi'></legend><bdo id='2ammi'><pre id='2ammi'><center id='2ammi'></center></pre></bdo></b><th id='2ammi'></th></span></q></dt></tr></i><div id='2ammi'><tfoot id='2ammi'></tfoot><dl id='2ammi'><fieldset id='2ammi'></fieldset></dl></div>
                  本文介绍了在调试模式下执行控制台应用程序后,如何让 Visual Studio 暂停?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一组 Boost 单元测试,我想作为控制台应用程序运行.

                  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.

                  我不想添加'system("pause");'或任何其他技巧,例如在我的程序中读取字符.我只想在运行调试测试后让 Visual Studio 暂停,就像我在发布模式下运行一样.如果在 Visual Studio 的输出窗口之一中捕获测试的输出,我也希望这样做,但这似乎也比应有的困难.

                  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.

                  我该怎么做?

                  推荐答案

                  Boost 测试提供以下内容 Visual Studio 的使用建议 使您能够在编译结束时自动运行单元测试并捕获输出进入构建窗口.

                  Boost test offers the following usage recommendations for Visual Studio that would enable you to run the unit tests automatically at the end of compilation and capture the output into the build window.

                  这个技巧的一个很好的副作用是它使您能够将测试失败视为编译错误....您可以使用通常用于编译错误分析的键盘快捷键/鼠标点击来跳过这些错误..."

                  The nice side effect of this trick is it enable you to treat test failures as compilation errors. "...you could jump through these errors using usual keyboard shortcuts/mouse clicks you use for compilation error analysis..."

                  这篇关于在调试模式下执行控制台应用程序后,如何让 Visual Studio 暂停?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to limit the number of running instances in C++(C++中如何限制运行实例的数量)
                  Using boost::asio::async_read with stdin?(将 boost::asio::async_read 与 stdin 一起使用?)
                  How to find out what dependencies (i.e other Boost libraries) a particular Boost library requires?(如何找出特定 Boost 库需要哪些依赖项(即其他 Boost 库)?)
                  What#39;s the purpose of a leading quot;::quot; in a C++ method call(引导“::的目的是什么?在 C++ 方法调用中)
                  Boost Spirit x3: parse into structs(Boost Spirit x3:解析为结构体)
                  How boost auto-linking makes choice?(boost自动链接如何做出选择?)

                    <bdo id='bwAtv'></bdo><ul id='bwAtv'></ul>

                          <small id='bwAtv'></small><noframes id='bwAtv'>

                          <legend id='bwAtv'><style id='bwAtv'><dir id='bwAtv'><q id='bwAtv'></q></dir></style></legend>

                            <tbody id='bwAtv'></tbody>

                          • <tfoot id='bwAtv'></tfoot>
                          • <i id='bwAtv'><tr id='bwAtv'><dt id='bwAtv'><q id='bwAtv'><span id='bwAtv'><b id='bwAtv'><form id='bwAtv'><ins id='bwAtv'></ins><ul id='bwAtv'></ul><sub id='bwAtv'></sub></form><legend id='bwAtv'></legend><bdo id='bwAtv'><pre id='bwAtv'><center id='bwAtv'></center></pre></bdo></b><th id='bwAtv'></th></span></q></dt></tr></i><div id='bwAtv'><tfoot id='bwAtv'></tfoot><dl id='bwAtv'><fieldset id='bwAtv'></fieldset></dl></div>