Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 537
Jeroen Avatar asked Mar 17 '17 11:03

Jeroen


People also ask

How do I fix Chrome script debugging in Visual Studio is enabled?

If you want Visual Studio to return to its default pre-15.7 behavior, all you have to do is enable script debugging in Tools | Options | Debugging | and check “Enable JavaScript debugging for ASP.NET (Chrome, Edge, and IE).

How do I use Chrome debugger extension in VS Code?

To debug any project in either Chrome or Microsoft Edge, all you need to do is to start a session by pressing F5 or activating the debug icon in the menu bar and selecting “Run and debug”. Alternatively, you can also use the Visual Studio Code command palette and run the “Debug: Open Link” command.

How do I enable an extension on a website?

At the top right, click the three stacked dots, 'More tools' and then 'Extensions'. On the extension, click 'Details'. Under 'Permissions', you can add or remove a site: Add: Change 'Allow this extension to read and change all your data on websites that you visit' to 'On specific sites'.

How do I debug extensions in Chrome?

# Background script Navigate to the chrome extensions management page at chrome://extensions and ensure developer mode is on. Click the Load Unpacked button and select the broken extension directory. After the extension is loaded, it should have three buttons: Details, Remove and Errors in red letters.


2 Answers

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.

like image 53
Paul Suart Avatar answered Oct 23 '22 15:10

Paul Suart


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.

like image 24
tom031 Avatar answered Oct 23 '22 16:10

tom031