You might have a profiler running somewhere, overriding the required environment variable.
To diagnose the situation, we would need to obtain the environment variable of the test runner process. I would like you to perform the following steps:
1) Open Regedit, navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
2) Create a new Key named as the test runner process: If you're using VS2010's MSTest runner, it's called "QTAgent32.exe" (without the quotes)
3) Create a new String Variable called "Debugger", double click it, and set the value to "vsjitdebugger.exe" (again, all without quotes).
4) In your VS2010, under the Typemock menu, select Disable, then Enable Typemock. This will close any cached processes of the test runner.
5) Run your tests. You will get a Just-in-Time dialog, asking you to attach a debugger - that is fine!
6) While the dialog is open, open Process Explorer
, and find the test runner process (should be under devenv.exe)
7) Double click on the test runner process, and go to the Environment tab.
8) Find the entry for "COR_PROFILER", and write down the GUID (I think you can't copy-paste, so a screenshot will be fine too).
9) Either post it here, or send it to firstname.lastname@example.org
10) Remove the registry key you've added!
Let me know if you need an additional assistance.