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.
Related
I use Firefox Developer Edition for all my development. But I would like DevTools to always be open when I start Firefox. Is there any way to do that? I know I can just hit F12 but it would be a nice feature.
I probably should have clarified a bit more...
What I was really trying to do was to get Visual Studio 2022 to automatically open Firefox DevEd with the DevTools open when I began debugging my VS project.
By default, VS will automatically open your chosen browser when debugging. However the Debug profile does not include a way to send the "-devtools" option to Firefox. (Or if it does, I couldn't find it.)
So I unchecked the "Launch Browser" setting in the Debug profile...
...and added "-devtools" to the Target item in the Firefox Properties panel.
So now when I debug my project, I just Run it then manually open Firefox. And it still supports Hot Reload if you have that enabled. This works pretty well but it would still be nice if you could send options/flags to your chosen browser. But this will work for now!
I have built an add-in which works fine in Excel online, whereas it does not work in Excel 2016 for Windows.
I know that in Windows 10, we could use this tool to debug the add-in, however I am using Windows 7.
I just installed Visual Studio 2017, right clicking on the add-in shows a menu where Attach Debugger is. But clicking on Attach Debugger fires nothing.
Does anyone know how to debug in this case?
Two potential options:
You can use Volorn.js to remotely debug your add-in. You can use the Debug Office Add-ins on iPad and Mac article as a starting point. Although this article is targeting Mac and iPad, the concepts are the same for Windows.
You can also use Visual Studio by creating a new Excel Web Add-in. Simply replace the default manifest with your own. Note that you still need to retain the default web site, Visual Studio still this for some library references. It will use your manifest's URL for the source location however.
Office applications use Internet Explorer for the web browser, so all settings from IE should carry over. I have found that if you disable (uncheck) both the Disable script debugging (Internet Explorer) and Disable script debugging (Other) options, your debugger breakpoints will be hit (I tested this in Outlook 2016).
You will need add debugger; statements to the source code to add breakpoints. When these statements are hit, a dialog like this should appear:
Simply select 'Yes' and a new instance of visual studio should open, with the debugger attached to your script.
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.
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..
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...