Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010's "Browse With..." keeps forgetting my custom entry. Any way around that?

I'm trying to create a custom entry in Visual Studio 2010's "Browse With..." dialog for debugging in Chrome's Incognito mode (basically, so I can debug without cache or cookies).

So, I open the dialog, click "Add", enter the details:

  • Program Name: "C:\Users\[my-username]\AppData\Local\Google\Chrome\Application\chrome.exe" --incognito
  • Friendly Name: Google Chrome Incognito

I click "OK". The --incognito flag prompts the dialog: "File name...contains parameters that cannot be validated. Do you want to change your entry?" I click "No", because I know the command is correct (and because it's the only way of continuing).

The new entry shows up in the list, I click "Set as Default", I click "Browse", and my site opens in Google Chrome Incognito just like I wanted it to.

However, the next time I debug, the site opens in my previous default and if I reopen the "Browse With..." dialog, my "Google Chrome Incognito" entry is gone.

Extremely frustrating. Anyone know of a solution?

I looked into the WoVS Default Browser Switcher extension, but it doesn't seem to allow the creation of browser settings.

I also gave this approach by Scott Hanselman a shot. But Visual Studio keeps resetting the browsers.xml file.

like image 226
Lobstrosity Avatar asked Feb 03 '12 20:02

Lobstrosity


1 Answers

Try creating a batch file and add the following (change the path if required):

START /d "C:\Program Files (x86)\Google\Chrome\Application" chrome.exe %1 --incognito 

The first argument (%1) is the URL.

Now use this batch file as the "Program name" when you set the 'Browse With' option.

Note: I use Visual Studio 2010

like image 101
w3dev Avatar answered Oct 21 '22 17:10

w3dev