davide
davide

Reputation: 231

CMake and step-by-step debugging in Visual Studio

How can I debug step-by-step a project part of Visual Studio 2010 solution created by CMake? The CMakeLists.txt has created the three projects ALL_BUILD, RUN_TEST and INSTALL, and other separate projects for each of the targets of the CMakeLists.txt Tests are therefore created by CMake and so are listed in Visual Studio as separate projects to compile, in order to generate this way an executable for each test. I am not using the inner test framework offered by Visual Studio, because it seems that CMake are not taking it into consideration!! Given that building RUN_TEST some tests fail, I would like to do a step-by-step debug of the tests, but it is not possible to do this by setting a test as start project. Moreover, the test has no command line arguments set if executed outside the RUN_TEST script.

Is there someone who knows CMake with Visual Studio 2010 ?

Does anyone know how I can debug my tests?

Tnx in advance

Upvotes: 0

Views: 1452

Answers (1)

TobiMcNamobi
TobiMcNamobi

Reputation: 4813

In case you are using the CppUnitTestFramework:

Open the Test View (Test / Windows / Test View). You should see a list of all tests there. Right click a test you want to debug and select "Debug Selection". That's it.

You may also select more than one test and debug them in this way.

Upvotes: 1

Related Questions