ide_usage_recommendations.html 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>IDE usage recommendations</title>
  5. <link rel="stylesheet" href="../../boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
  7. <link rel="home" href="../../index.html" title="Boost.Test">
  8. <link rel="up" href="../practical_usage_recommendations.html" title="Practical usage recommendations">
  9. <link rel="prev" href="general.html" title="General">
  10. <link rel="next" href="command_line_usage_recommendatio.html" title="Command line usage recommendations">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr>
  14. <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
  15. <td align="center"><a href="../../../../../../index.html">Home</a></td>
  16. <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
  17. <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
  18. <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
  19. <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
  20. </tr></table>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="general.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations"></a><a class="link" href="ide_usage_recommendations.html" title="IDE usage recommendations">IDE
  28. usage recommendations</a>
  29. </h3></div></div></div>
  30. <p>
  31. This recommendation is shown using Microsoft Visual Studio as an example,
  32. but you can apply similar steps in different IDEs.
  33. </p>
  34. <h5>
  35. <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h0"></a>
  36. <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat">Use
  37. custom build step to automatically start test program after compilation</a>
  38. </h5>
  39. <p>
  40. I found it most convenient to put test program execution as a post-build
  41. step in compilation. To do so use project property page:
  42. </p>
  43. <p>
  44. <span class="inlinemediaobject"><img src="../../images/post_build_event.jpg"></span>
  45. </p>
  46. <p>
  47. Full command you need in "Command Line" field is:
  48. </p>
  49. <pre class="programlisting">"$(TargetDir)$(TargetName).exe" --<a class="link" href="../utf_reference/rt_param_reference/result_code.html" title="result_code"><code class="computeroutput"><span class="identifier">result_code</span></code></a>=no --<a class="link" href="../utf_reference/rt_param_reference/report_level.html" title="report_level"><code class="computeroutput"><span class="identifier">report_level</span></code></a>=no
  50. </pre>
  51. <p>
  52. Note that both report level and result code are suppressed. This way the
  53. only output you may see from this command are possible runtime errors. But
  54. the best part is that you could jump through these errors using usual keyboard
  55. shortcuts/mouse clicks you use for compilation error analysis:
  56. </p>
  57. <p>
  58. <span class="inlinemediaobject"><img src="../../images/post_build_out.jpg"></span>
  59. </p>
  60. <h5>
  61. <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h1"></a>
  62. <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew">If
  63. you got fatal exception somewhere within test case, make debugger break at
  64. the point the failure by adding extra command line argument</a>
  65. </h5>
  66. <p>
  67. If you got "memory access violation" message (or any other message
  68. indication fatal or system error) when you run you test, to get more information
  69. of error location add
  70. </p>
  71. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=no
  72. </pre>
  73. <p>
  74. to the test run command line:
  75. </p>
  76. <p>
  77. <span class="inlinemediaobject"><img src="../../images/run_args.jpg"></span>
  78. </p>
  79. <p>
  80. Now run the test again under debugger and it will break at the point of failure.
  81. </p>
  82. </div>
  83. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  84. <td align="left"></td>
  85. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  86. contributors<p>
  87. Distributed under the Boost Software License, Version 1.0. (See accompanying
  88. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  89. </p>
  90. </div></td>
  91. </tr></table>
  92. <hr>
  93. <div class="spirit-nav">
  94. <a accesskey="p" href="general.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  95. </div>
  96. </body>
  97. </html>