Domanda

I have a solution in VS2010 (C++ code) that includes test files directly in the src and include folders for the project of a plug-in. I am using Google Test framework. The plug-in, let's call it myPlugin, is running on a software, say mySoft.

######################################################################

Here is the issue:

I can run tests with command line, ok.

But i would like to debug inside the GTESTs. Why ? Because the tests are not really unit tests, they are setting a lot of parameters, and i would like to check step by step that everything is set ok. I know this is not mandatory to solve this and that i can debug the application itself. Anyway, this is my question, i want to debug inside a gtest.

I try to config VS2010 properties so as to launch the tests from VS, and this is not working. ############################################################################

More details:

To run the tests, i have to have an executable launched. In other words, i am running tests while an application, mySoft.exe, is running. The plug-in is running using another executable, the sdk_mySoft.exe.

The command lines (that work) are

mySoft.exe -sdkRun=pluginLevel ;pluginDirName;version;myPlugin_x64.dll
                                                          --gtest_output=xml

-sdkRun is in-house command offered by the sdk to set up GTests. So here i launch my application, run the plug-in, get some logs from google test, ok.

Then, I try to configure VS with these debugging properties:

Command $(SolutionDir)\bin64\mySoft.exe

Command Arguments -sdkRun=pluginLevel ;pluginDirName;version;myPlugin_x64.dll 
                                                                --gtest_output=xml 

and here this is not working.

  • Error is

Debugging information for 'mysoft.exe' cannot be found or does not match. Cannot find or open the pdb files.

Any idea ?

  • How to debug in gtest, taking into account the special conditions here: have to launch an application?

Thanks

È stato utile?

Soluzione

To debug the GTest, the debugger needs to be linked to application.

Launching the application, click on CTRL gives access to the VS debugger.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top