I've got a solution in VS2010 where I can't get the code coverage working, I always end up with the error
"Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors.
I did set up everything as usual, so in the test settings I enabled the "Code Coverage" checkbox on the "Data and Diagnostics" page and chose the dll to be tested. I also added the "Re-signing key file" as we sign our assemblies. I don't know any other thing that prevents me from getting the coverage info, manually comparing the "Local.testsettings" for this solution with files from other working solutions didn't show any problems.
Any ideas what the reason might be and how to get it working?
Thanks in advance
G.
Alright,
For some reason the Test Settings were changed from "Local (local.testsettings)" to "Trace and Test Impact (traceandtestimpact.testsettings)". Don't know why that happened, now it works again...
Related
We have some library projects with a VPI extension. Defined in the DPR with library at start and {$E vpi} at end (Options > output settings > Application > Target file extension: vpi).
library appname;
uses
//...
{$E vpi}
Problem: When I run a debug in a VPI project it works only once. After any change it won't hit the break again. Now showing a "green" breakpoint when you run the app. The only way to get it back to work is by closing and open the IDE.
My Co-worker asked me if I have this problem last year, which I didn't. In his machine "when you change anything in your source, even a space in a comment, the break points won't work till you close and open the IDE again" he said.
We've compared lots of config from the IDE and we didn't find anything.
Now for some "no reason" my computer also stopped working with the debug.
I have looked into this topic "Delphi: why breakpoints from time to time are not usable (green highlighted line on IDE)?" with no luck.
I've tried the Clear unit Cache, un-check and check again the debug info, include TD32, include remote debug, uncheck optimization.
I've asked to other teams and they said that some machines works others don't. But they also don't know why.
Maybe someone here have another trick that may help.
FYI, I am using a MCVS 2013 to build and run my program. However, I kept getting the error as shown in the picture, I have try to google the solution out, but there are no much information available. Besides that, I also getting 127 warnings. Some one from here please tell me how to prevent this error happen. Thanks!
In the properties page for your project, under the Linker -> Debugging tab, you need to use true or false instead of Debug as shown in the figure I attached.
So there are two things going on which I have no clue and if someone can help that would be awesome.
I am doing automation using Selenium WebDriver in conjunction with VS2010 (C#) and I am using the PageObject pattern, which has really been helpful in constructed clean, organized code. Anyway, here are my two issues:
When I Debug my code the automation runs perfectly with the desired results at the end. But when I enter a breakpoint and step into the code, it gives me an error message stating "There is no source available - There is no source code available for the current location" Then the message looks like it is looking in my directory for a particular class file and it gives me a bunch of error messages and the last line says: The debugger could not locate the source file c:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Support\PageObjects\WebElementProxy.cs.
Again when I run through the program with no breakpoints it's fine. But once I enter a breakpoint and step into the code, it gives me that error like it's looking for a particular class. I have all .dlls referenced to the project so I am not sure what is going on there.
When I run the code in Chrome, everything seems to work fine. But when I try to run it using FireFox, it cannot seem to locate the first button. I have my code set up as:
//Get A Quote Button Control by ID
[FindsBy(How = How.Id, Using = "bt_ContinueWelcome")]
[CacheLookup]
public IWebElement GetAQuoteButtonId;
So Chrome will read it fine but not FireFox, and I have not tried IE.
Any help for the above would be greatly appreciated. I want to start inserting validation but I need to get over these hurdles first - thank you
How to avoid the window "No source available" while stepping into debug mode on VS2010 SL5
In Tools, Options, Debug, General Page. Check if you have 'Enable .NET Framework source stepping' enabled, if it is enabled, disable.
I tried all the suggested fixes; Nothing worked for me.
I finally figured out the solution after several hours of trial & error iterations.
It turns out that the 'No Source Available' error is due to a stack-overflow within the VS debugger env.
The C/C++ code function that was supposed to be stepped-into (by VS debugger), was using a variable that was initialized to a stack array of a few MB in size. When I replaced this with a heap allocation, VS was successfully able to step into the code.
This worked for me.
Please note that in my case, the actual code (with the stack allocation) ran without a stack-overflow error within the debugger (if I skip the No source available error). It was just that VS's debugger's was not able to step-into a particular function sitting inside another C/CPP file, because of the internal stack overflow.
Hope this helps.
You can hit Shift+F11 to step out and it will complete whatever unavailable function it is in and stop at the next line (it may be unavailable as well, but continue to use Step Out until you get to code you want to examine.)
Regarding VS2019, a description for the issue is provided at MSDocs.
For the requisite vcruntime and ucrt source files, the problem can occur after importing from a previous VS version which has since been uninstalled.
To prevent VS from using the old directories, find the solution property pages and navigate to the Debug Source Files Dialog Box.
Click the tick button to check the entries where any invalid ones can be removed.
The vcruntime and ucrt source should always exist in the directories, and the path at the top of the Browse to find source code dialog should always show the correct path.
In my case, because of a venerable drive bug, it is given to prompt for the "D" drive instead of the "C" drive. Further, the provided path cannot be pasted over to refresh the view, so, if none the wiser, one has to use the dialog to navigate all the way up to the required location from the desktop or equivalent.
Here there is an extension for this issue:
http://erwinmayer.com/labs/visual-studio-2010-extension-disable-no-source-available-tab/
But in my own experience before finding this article (I was in page but I was trying to fix it myself without reading article) I have fixed this problem just by accepting a confirmation message saying something like "Selected source file is different from compiled assembly. Are you sure you want to use this file for debug?". But I can't remember exactly what I did to get this message. I think there was a linklabel which I clicked on "No source available" window and then confirmation message appeared and after confirm the problem ran away.
I'm using Visual Studio 2010 SP1. When I run "All Tests in Solution", I get code coverage results to show up just fine. However, when I run a subset of tests using "Tests in Current Context", I only see "Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors."
A Google search shows that others do get code coverage results when running a subset of tests. Is there a configuration I'm missing somewhere?
I think I figured out the reason for this, but it still doesn't make complete sense. If I run the tests in the current context by going to "Test -> Debug -> Tests in Current Context", it doesn't work (code coverage is not generated). However, if I do "Test -> Run -> Tests in Current Context", then it works. So far so good, it kind of makes sense that it would only work when not in Debug mode.
But the strange part is if I use the keyboard shortcut for "Test -> Run -> Tests in Current Context" (Ctrl-R, T), it does not work. So I have to run it from the menu instead of using the keyboard shortcut, otherwise it says no code coverage was generated.