简体   繁体   English

GoogleTest:如何设置断点?

[英]GoogleTest: How to set a breakpoint?

I'm using Visual Studio 2010 C++ with Google test. 我正在使用Visual Studio 2010 C ++和Google测试。 I have a post-build event on my test project to run the test project. 我在我的测试项目上有一个post-build事件来运行测试项目。 This works and the google test test results are displayed in the visual studio output window. 这有效,谷歌测试测试结果显示在visual studio输出窗口中。 However, now I'd like to set a debug breakpoint to step through a test. 但是,现在我想设置一个调试断点来逐步完成测试。 When I set a break point in either my test code or in the code it calls nothing happens. 当我在我的测试代码或代码中设置断点时,它调用没有任何反应。

How can I set a breakpoint with google test? 如何使用谷歌测试设置断点? Or probably more accurately, how can I get it to trigger the debugger? 或者更准确地说,如何让它触发调试器?

I guess you have a separate project that builds the test. 我猜你有一个单独的项目来构建测试。 You should just run it under the debugger. 您应该在调试器下运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM