When I debug in Visual Studio, Firefox opens and that is annoying because of the hookups that Internet Explorer and Visual Studio have, such as when you close the Internet Explorer browser that starting debug opened, Visual Studio stops debugging. How can I get Visual Studio to open Internet Explorer instead without having to set Internet Explorer as my default browser?
14 Answers
Scott Guthrie has made a post on how to change Visual Studio's default browser:
1) Right click on a .aspx page in your solution explorer
2) Select the "browse with" context menu option
3) In the dialog you can select or add a browser. If you want Firefox in the list, click "add" and point to the firefox.exe filename
4) Click the "Set as Default" button to make this the default browser when you run any page on the site.
I however dislike the fact that this isn't as straightforward as it should be.
In Visual Studio 2010 the default browser gets reset often (just about every time an IDE setting is changed or even after restarting Visual Studio). There is now a default browser selector extension for 2010 to help combat this:
!!!Update!!! It appears that the WoVS Default Browser Switcher is no longer available for free according to @Cory. You might try Default Browser Changer instead but I have not tested it. If you already have the WoVS plugin I would recommend backing it up so that you can install it later.
The following solution may no longer work:
WoVS Default Browser Switcher: http://visualstudiogallery.msdn.microsoft.com/en-us/bb424812-f742-41ef-974a-cdac607df921
Edit: This works with ASP.NET MVC applications as well.
Note: One negative side effect of installing this extension is that it seems to nag to be updated about once a month. This has caused some to uninstall it because, to them, its more bothersome then the problem it fixes. Regardless it is easily updated through the extension manager and I still find it very useful.
You will see the following error when starting VS:
The Default Browser Switcher beta bits have expired. Please use the Extension Manager or visit the VS Gallery to download updated bits.
You may debug by firefox also.
Follow these steps: Tool
->Attach to process
and select firefox.exe
or your default browser. Then debugger will work with this browser. But I had some trouble when firefox is 32 bit and and VS2010 is 64 bit.
Anyway right click the current document, browse with -->
than choose your browser, than set it as default. This way is better. B'cause firefox's process id may change, so you will be annoyed for attaching the process again.
Your project might not have aspx files since it might be another kind of web project.
However, if it has a ClientApp folder:
- go to the standard view of the Solution Explorer (Ctrl+Alt+L) where you can find your-project name solution (click on the folders icon at the top to be sure (saying "Solutions and Folders"))
- right-click on the ClientApp folder itself
- Browse with... will show up near the top (near View in Browser option), click on it and the browsers dialog shows up
- click on your preferred browser
- click on Set as Default
- click on Browse to confirm (this will open the browser you just chose on that folder)