I am attempting to run a C++ unit test in Visual Studio 2008. While the test seems to run fine, when I attempt to debug it (after compiling in debug mode) I get the following message:
Debugging information for VSTestHost.exe cannot be found or does not match. Cannot find or open the PDB file.
This happens even if I open a completely new, empty unit test. The same happens in Visual Studio 2010 and 2012, with the test host being QTAgent32.exe and vstest.executionengine.x86.exe, respectively. If I inspect the test host process (VSTestHost.exe) using ProcessExplorer while the dialog appears, I see it is running in its own directory (Common7\IDE under the Visual Studio installation directory). Copying the PDB file there however does not help.
I stress again that this happens with a clean and empty test. How do I make the test host process load the test project's PDB file?
Turns out this message can be ignored. While the host process is indeed without debug information, the test project's PDB file should be loaded correctly, so that breakpoints in the test code will be hit.