Hallo Aaron, if you’d like to have the full luxury of visual studio with test explorer and running/debugging tests directly as you can do it with other .NET based tests etc. you can try these extensions:
- child process debugging power tools (https://marketplace.visualstudio.com/items?itemName=GreggMiskelly.MicrosoftChildProcessDebuggingPowerTool) - ctesttestadapter (https://github.com/micst/CTestTestAdapter/tree/master/dist) For debugging tests you need both extensions: the first for hooking on the process that is launched by ctest.exe, the second for actual ctest integration in visual studio. Compared to running your binary test-targets directly you will gain the advantage that you do not have to modify and debugging command line, you have all tests listed in a explorer windows with easy access and you get all verbose messages from ctest in the test explorer as well. The VSIX extension is a fork from https://github.com/toeb/CTestTestAdapter with some changes and bugfixes. It's not tested very well but I use it every day and it works for me. Do not use the "ctesttestadapter" you can find directly in visual studio, it does not work with latest cmake. CAUTION: If you use the cmaketools extension (http://cmaketools.codeplex.com) in Visual Studio, the link to the test location in the test explorer does not work (double clicking on a test will show some "could open file location" error). This does not break the test adapter, opening the CTestTestfile.cmake is just not possible from within Visual Studio. Michael From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Aaron Boxer Sent: Thursday, January 05, 2017 9:17 PM To: Bill Hoffman Cc: cmake Subject: Re: [CMake] Tracing ctest crash on windows Thanks, Bill and Jakob. I did what you suggested and found the problem Aaron On Thu, Jan 5, 2017 at 11:51 AM, Bill Hoffman <bill.hoff...@kitware.com<mailto:bill.hoff...@kitware.com>> wrote: On 1/5/2017 9:32 AM, Jakob van Bethlehem wrote: CTest is not some magical tool that internally runs your test or something like that - instead CTest just fires up your test executable and does clever things with the output. In the same way you can just set your test project as startup-project, and debug it like any other executable. Sincerely, Jakob On Wed, Jan 4, 2017 at 2:43 PM, Aaron Boxer <boxe...@gmail.com<mailto:boxe...@gmail.com> <mailto:boxe...@gmail.com<mailto:boxe...@gmail.com>>> wrote: Hello, I am on windows, with visual studio 2015. Some of my ctest tests are crashing with exception. Is there a way of debugging these tests ? When I run in debug mode, I get an exception dialog, but can't drop into debugging environment. If you run ctest -VV it will show the full command line. Best way is to just run the same command in the debugger. -Bill -- Powered by www.kitware.com<http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake