Visual Studio 2012 Default Debug IE Browser Version - visual-studio

Details first: using VS2012, IE10, Windows 8, IIS 7.5 express, ASP.NET webforms application.
Problem: when I debug an ASP.NET web forms application, IE10 opens as expected but it's under IE10 compatibility mode using IE7 document standards. I would rather this did not happen as I have to remember to open the developer tools and change the browser version used in debugging. And plenty of times I have forgotten, assumed the layout and CSS is correct then remember sometime later to check that setting and find out everything is broken in non-IE7 versions.
It's rather frustrating and I cannot find any configuration files or settings within IE10 and VS2012 to change this. And I cannot find any configuration files for IIS 7.5 at all. And, in fact, I tried the VS2012 development server and it opens IE10 the same way, so most likely not an IIS express issue.
I should note: IE10 opens in non-compatibility mode for normal browsing. It only defaults this way in debugging web applications from VS2012.
Anybody know how to change this default setting? Thanks in advance.

I had the same problem.
Open IE
Press Alt and click Tools from IE menu bar
Select Compatibility View Settings
Remove localhost from Websites you added to Compatibility View

You can add the X-UA-Compatibility meta tag to force IE to run as a particular version, generally speaking you want to force it to edge, which forces it to run as the standards version:
<meta http-equiv="x-ua-compatible" content="IE=edge">
You can learn more about the meta tag here.

Related

Enable extensions when debugging website in Chrome from Visual Studio 2017

Switching from Visual Studio 2015 to 2017 I find that launching a Web API project now starts a clean, separate Chrome window. For the most part I like that, and I certainly like the idea, however: this also means extensions are missing in Chrome.
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Or, failing that, could I revert back to the old behavior where my project is opened as a fresh tab in my existing Chrome window?
I've tried Googling but found nothing. I checked the dropdown in Visual Studio with browsers (and checked the "Browse With..." dialog) but found no solution there either.
All you need to do is to sign-in to the instance of Chrome that VS2017 launches as the user you have all your usual extensions installed under (i.e. sign-in as the same user you usually sign-in as).
This sign-in "sticks", so extensions will load in the current - and all subsequent - debugging sessions.
You can revert back to the old behavior by
Debug > Options > Debugging > General > (uncheck) Enable JavaScript debugging for ASP.Net (Chrome and IE).
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Yes, but it works for one project only, mean you need to re-install extensions when you launch a brand new project. I tried Sync in Chrome (not work).
In my opinion, there are something to do with Chrome remote debugging protocol profile. I hope someone knows about Chrome can give a final solution for this.
you can study more here: remote debugging protocol
There is a way that you no need to change anything. But it annoying.
Because Visual Studio 2017 use an instance of Chrome for debug mode when you hit F5, so you can leave that debug mode instance with remote debugging protocol open, and use your default Chrome instance with full extensions. Just copy and paste the link into your favorite Chrome instance.
Cheer! hope it help.

VS 2012: Real support for debugging via Chrome now is supported?

Can we now debug websites / services and set break points while using Google Chrome as the browser ? Or is this still only supportable in IE ?
I know before setting breakpoints (F9) and then debugging in IE worked without problems but using chrome was never supported.
I have tried to use google to find the answer to this but I am still unable to confirm it, I can't believe that debugging on services / sites are still not support in VS via another browser apart from IE.
I know the VS 2013 is upcoming, maybe this will address the problem?
EDIT
Sorry i should have made it clear, i am talking about client side debugging directly in VS using a NON IE Browser
You are misunderstanding client and server-side.
Client-side:
We don't care if the website is developed in .Net, with Visual Studio, PHP or whatever you want, the browser gives you some tools for debugging websites so the problem is from the browser not Visual Studio. Even if you upgrade to VS 2013 that won't change your problem, Visual Studio has no way to know the state of the JavaScript for a page opened by a client for example.
You may have heard about SignalR used in VS 2013 (Browser link feature) and that may have confused you, if so SignalR is only for refreshing client-side pages when you edit the view for example, but not for debugging.
Server-side:
Add your breakpoint in Visual Studio and then attach the debugger (Tools > Attach to process). In that way you will be able to debug server-side code (e.g. C# code) in Visual Studio. Note that the browser has no way to know the code server-side.

How can I debug Silverlight 5 applications in Visual Studio 2012 after installing Internet Explorer 10?

I can no longer debug my Silverlight application in Visual Studio after updating to Internet Explorer 10. I made no other changes to my system and it was working fine with Internet Explorer 9 just before the update to IE10. When I hit F5 in Visual Studio, IE10 is fired up and the Silverlight application runs in the browser, but breakpoints are not hit in Silverlight code. If I hit shift+F5 (stop debugging), the browser remains open (this used to shut it down). Alternatively, if I close the browser while debugging, it doesn't stop debugging in Visual Studio (which it always did before). I'm running Win7 64.
This problem has also been reproduced in Visual Studio 2010 and Silverlight 4.
I had the same problem with Visual Studio 2012 and Silverlight 5. The symptoms that I was getting included the following.
Multiple browser instances would be opened when I started the application in debug mode within Visual Studio.
I sometimes got an error in the browser saying that the application could not be loaded.
Visual Studio would automatically detach from the browser and drop out of debug mode.
Turning off the Silverlight debugger (see the Web tab in the properties dialog for the web project) seemed to result in less of the other problems. This did however mean that I could not debug Silverlight code.
To resolve these issues, I right clicked on an aspx file in the solution explorer and selected 'Browse With...' to open the following dialog.
Note that there are two entries for 'Internet Explorer'.
I removed both (I set Firefox as the default temporarily to do so), cancelled out of the dialog and then reopened it. At this point, a new entry for 'Internet Explorer' had been added back in automatically. I made this the default and then had no further issues.
I had the same with VS2012..
Looks like Visual studio got confused which IE to use - somehow in system I hade two instances of IE as target browser (In VS2012 window called "Browse With..")
I removed all IE's from VS targets and restarted VS. Then only one instance of IE appeared after and debugger attaches normally.
I had a similar problem after opening a Silverlight-based application in two instances of IE10 at the same time. I could not debug. After which, I had switched between Chrome and IE10 in order to try and solve the problem. I could debug in Chrome but not IE10. But Chrome was cumbersome to run for debugging purposes.
Ultimately, I had to remove all the temporary files associated with VS builds in a three places:
C:\Users\brchase\AppData\Local
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
As well, I had to do a complete clean on the project and shut down IISExpress.
Also, I did a Tools /Delete Browsing History in IE10.
The above worked and I could debug again in IE10 -- even with multiple instances running.
Using Winserver 2008R2, VS2012 or VS2010. Latest version of FireFox does not hit SilverLight breakpoints. Tim Heurs solution at http://timheuer.com/blog/archive/2010/08/16/enable-silverlight-debugging-in-firefox-visual-studio.aspx does not apply as the required line is not in the FireFox config. My fix was to go back to IE9 (My IE10 was broken so I can't say for sure IE10 doesn't work)
Tried all of these suggestions.
Finally had to remove and re-install VS 2012 (which isn't straight forward anymore because after Oct 2013 some of the certificates had expired). Yay Microsoft!
So after re-installing I still had to go into the "Browse To" and switch it from IE to another choice then back to IE and it magically works now..
I think it was because Internet Explorer updated itself and left VS confused..

visual studio 2010 and default browsers

Is there any way that I can get visual studio (2010 or other) to decide what browser to launch depending on the type of project I am working on? I prefer to use IE when I am developing Silverlight projects, and Chrome / Firefox / anything but IE when I am working on ASP.NET projects. Of course manually setting my default browser is always an option depending on what I am doing, but I feel like VS2010 should be smart enough to handle this for me. Any ideas?
You could use the WoVS Default Browser Switcher. Whilst it won't automatically detect the project type, it allows you to set the default browser in one click.
use this extension
It's pretty good.

Why does Visual Web Developer 2008/2010 no longer debug silverlight apps in Firefox?

Suddenly today Visual Web Developer does not allow me to debug Silverlight applications.
This happens in 2008 and 2010 versions.
It gives no error message, just ignores all break points.
It can still debug ASP.NET applications.
Is anyone else experiencing this?
Added:
Interesting: debugging works in Internet Explorer but not in Firefox. Also on a new installation on a second computer it debugs in both IE and FF. Just noticed that that FF browser is still version 3.6.3.
I cleared everything in Firefox (3.6.4) but it still doesn't debug in that browser (on two computers):
alt text http://www.deviantsart.com/upload/l46lcc.png
While uninstalling the Silverlight plugin I saw this:
alt text http://www.deviantsart.com/upload/1i7j8ao.png
Check this link:
http://forums.silverlight.net/forums/t/188434.aspx
The solution seems to be:
Regarding the debugging: I think it
would be possible to write a VS plugin
or similar to attach to the
plugin-container.exe process
automatically, however there's a
simpler solution. You can disable the
new isolation feature in Firefox:
Type "about:config" into FF's address
bar Accept the warning (if applicable)
Search for the entry
"dom.ipc.plugins.enabled.npctrl.dll"
Change its value from "true" to
"false" (double-click) Restart the
browser
Mine seems to work fine in both VS2008 and 2010...

Resources