Test Impact View does not record data - visual-studio-2010

So i'm getting started a bit with unit testing in C# (using the built in testing tools). The tutorial i was following mentioned the Test Impact View. Told me to just open the window and click the link to enable the feature.
The window says there is no test impact data available and need to run the tests (which i do). But nothing happens then. It keeps giving me that message. I have checked the options to see if the link was just bugging out or so and didn't enable the feature.
So, does anyone know what is going wrong?

You need to have VS2010 Premium or Ultimate, otherwise VS2010 professional only have Unit Testing take a look http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison

Related

Inspecting COM objects in VS 2017 debugger

I'm currently migranting an VBA powerpoint add-in to VSTO.
For weeks I've been struggling with Visual studio degug for COM objescts. AS you can see on the image below, the object types show {system._ComObject} and object inspection becomes a challenge since one must use the dynamic view, which is quite inconvenient in my opinion.
Looking around I've found a recommendation to activate the option "use managed code compatibility mode" in the general debugging settings, as you can see on Debugging setting
I also followed another the recommendation to set the property "Embed interop Types" on all my office related references to false.
After applying these changes. Voilà! The inspection began do work just as I wished to and as you can see here: Debug working properly
I was almost in heaven. My ecstasy lasted till I tried to change some code during debug and was informed by visual studio that
"managed compatibility mode does not support edit and continue".
Now I'm back in hell. With edit and continue I miss a decent COM object inspection. With COM inspection I cannot change code during debug.
This situation looks awkward and I would expect more from VS 2017.
Does anybody know how can I get decent COM inspection and edit and continue at the same time?
Does anybody know how can I get decent COM inspection and edit and
continue at the same time?
I am afraid that you cannnot get what you want.
Since you just debug a com object which is more like optimized, mixed, or SQL Server common language runtime (CLR) integration code(use ), as the official document said, Edit and Continue function does not support it.
Usually, to debug those mixed codes in VS, you should enable Use Managed Compatibility Mode or enable native code debugging, but those options cannot work well with Edit and Continue as the official document said.
You can check this document to know unsupported changes or supported changes to code.
So for your issue, there is no such option to use both of them.
As a suggestion, you should break the debugging process first, make some changes to your code. Then start Debugging to debug the new changes.
Besides, if you still want this feature, you could suggest a feature on our User Voice Forum. The Team will check your request carefully and hope they will give you a satisfactory reply.

Visual Studio 2019 Professional LiveShare not allowing Unit Testing

Our team works in C# and has recently updated to Visual Studio 2019 Professional. We are attempting to use Live Share for TDD.
While we can see one another typing, the remote user cannot build or run unit tests.
Am I missing a configuration?
Edit 1
I know this is an old post at this point. It seems that Microsoft sacrificed usability for security. The only thing that you can do with LiveShare is write code together. The person coding tests cannot be remote (AFAIK). Also, to do pair programming it will kind of work in a bad way (i.e. the navigator can make changes but the driver will not necessarily see them especially if they are in another file unless explicitly told where to look). When it is time for the driver and navigator to switch, it almost seems easier to push the code to a repo, terminate the live share session and have the new driver pull it and start a new live share session.
As far as mob programming, this really seems to fail to scale.

VS2010 - Break on events without intellitrace

I have VS2010 professional and Im working with a large code base that Im unfamiliar with. I want to know what code gets executed when a certain event occurs (namely, when I click a specific button). I know this could easily be done with Intellitrace, but that requires an Ultimate subscription (which is outrageously expensive). Is there any other way I can do this? Ideally without installing anything new (even if its free), but thats not a deal breaker.
You can see what .NET code is executed with Runtime Flow (developed by me, 30-day trial).

Browser Link always asking for "Do you want to stop debugging"

Just wondering my browser keeps asking if I want to stop debugging every time I hit browser link refresh very annoying as is slowing down devtime.
Has anybody else come across this?
cheers
Updated Answer, Root Cause Now Found
After what is now TWO years of seeing this error on and off I finally understand what's causing this. A BIG Thank you goes out to Damian Edwards for mentioning this in a community stand-up!
As a developer, we often do all of our development in Visual Studio in Debug mode rather than release mode. And it's very common for us to run our projects with F5. In this case VS runs the project with the debugger enabled, no surprise there.
So it turns out, the "Do you want to stop debugging? error dialog when you try to refresh via browserlink is saying is "Hey you made some changes that look like they might require recompiling the razor view in order to refresh the page, and in order to do that Visual Studio needs to stop the debugger session, is that OK?"
And the fix? This is gonna blow your mind. When you want to use browser link to rapidly refresh the page while doing html/css changes and never see this message again, do this: run the project using CTL+F5 instead of F5. This will run the project without firing up the debugger and you probably weren't gonna use the debugger anyway if you were planning on doing a bunch of html css work on a view using browerlink. :-) That's it, no more error message. Bam. You're welcome. (It took me T W O Y E A R S to figure that out. Hand against forehead, eyes rolling)
I have left my original answer below because it did seem to help in some cases and it has already received a couple upvotes, but in hind sight, I think it was more of a coincidental observation than a root cause..
Original
I have been struggling with this issue for nearly a year. I may have just discovered the cause. I was running two copies of visual studio, each with different web projects, at the same time. Then when I try to get browserlink to refresh the browser in one copy of visual studio it asks “Do you want to stop debugging”.
I then quit out of the 2nd copy of visual studio, and re-ran the web project in the first copy of visual studio and when I tried to get browserlink to refresh the browser it worked fine with no prompt. Yea. A better error message than “Do you want to stop debugging” might have been "It looks like you are running two web projects at the same time in different copies of visual studio. Browserlink does no support this, please close one of them."
You may want to check out this post: https://stackoverflow.com/a/21706524/4079626. If you are using an older version of IE (like IE9), then long-polling may be the issue.
Short answer
Browser Link will only use WebSockets on Windows 8 or Windows Server
2012
Longer answer
The following would explain the issue if you're using Visual Studio on
Windows 7, Windows Vista or Windows Server 2008:
IIS (Express) depends on the .NET framework implementation in
System.Net.WebSockets to handle WebSocket connections; as you
can read in the link to MSDN, you simply don't get an actual
implementation of the necessary classes when you install .NET 4.5 on
Windows 7.
So in that case, the server can't agree to the client's request to
change from standard HTTP to the WebSocket protocol, which forces the
SignalR client to use one of the fallback options (in your case:
long-polling).

Different ways to debug a web2py application

As I am new to web2py, I wonder what are the ways available for debugging a web2py application. So far, I've come across the following scenarios:
when a runtime error occurs in a web2py app, an error ticket is generated and normally useful information is contained in the ticket.
however, sometimes only a plain error message is available on a page, for example, 'bad request'. that's it. So what would be the best way in this case to track down what goes wrong? Logging? If so, how do we do it properly?
if no obvious error message is shown, but the app doesn't perform as expected. Usually, I use a debugger with breakpoints to check it out. Any other suggestion?
Any experience/insight is extremely welcome.
You can detect errors at your model or controller layer by adding unit tests. That will help narrow your debugging efforts, especially when the error ticket system breaks down. Unfortunately the web2py documentation doesn't stress the importance of unit tests enough. You can run doctests on your controllers with
python web2py.py -T <application_name>
Since the model layers run for each controller, you will at least find syntax errors in your at the model layer.
The latest version has an integrated debugger. You can set breakpoints on your code and step through it.
The other suggestions are good. I would also suggest the Wing IDE debugger. It isn't very expensive, and works well with Python generally and web2py specifically.
Wing has a capability to do remote debugging -- very useful when you're working through production-style deployment with remote app servers. That capability saved my bacon any number of times.
As #Derek pointed out there is an
integrated debugger for web2py
You can set a breakpoint from the integrated Web2py editor (clicking on 'toggle breakpoint') or setting it manually as indicated in the above link.
Once you hit the breakpoint, you can open http://localhost:8000/admin/debug/interact (if running locally to evaluate any expression at that point.

Resources