The 3rd of Diduary: Did you know you can debug ASP.NET in any browser?

Today is the third day of Diduary. You can see links to all of the published articles in the series here.

Often, I find myself needing to test my websites in multiple browsers. I would hope that all of you understand by now that pages like this one are no longer acceptable anymore. (If you don’t launch the link, utah.gov is a little behind the times. Netscape? Really?)

The way I generally do this is to press F5 to run my application, and wait for it to launch in Internet Explorer. Once this is done, I copy the address from IE, and paste it into Chrome, Firefox, etc. This works well for most cases. Sometimes, however, I just want to launch the ONE browser, without the overhead of all of them. Perhaps I am focusing on one small CSS anomaly, for example.

You’ve always been able to right-click on a web page in Visual Studio and choose “View in browser,” (which you can also do with Ctrl + Shift + W), but you may have never opened the “Browse With…” item right below it.

Here’s what the “Browse with…” dialog looks like:

If you haven’t used this dialog before, it allows you to launch your page using any application you choose. I had to manually add Firefox, Safari, and Chrome. Technically, you could add Microsoft Word, I suppose, if that’s the application you want to browse your site with. You’ll notice in my example, however, that I have Firefox as my default browser. This is different than the “default browser” for your operating system. This applies only to the Visual Studio environment. It does set an alternative browser as your default, though, which means that F5 will now launch my pages in Firefox instead of Internet Explorer. (You should still be testing your applications in all relevant browsers. The point of this article was to let you use your favorite by default, not encourage you to ignore the alternatives.)

I’d like to see this feature expanded, so that I can see the page in ALL browsers when I click F5. Certainly not something I want enabled ALL the time, but there are certainly times where it would be helpful.

5 thoughts on “The 3rd of Diduary: Did you know you can debug ASP.NET in any browser?

  1. How about a simple cmd/app OpenInAllBrowser wich starts the URL in multiple Browsers? I doubt it would be useable for real debugging as it forks to different processes but to start a page in several browsers with one click, why not? Could be a simple batch file of the form:iexplorer.exe %1firefox.exe %1…You see the pattern.Greetings,Georg

  2. Expression Studio 3 SuperBrowser for Visual Studio?… has it faults, sure, but its a start…

  3. How much better a thing it is to be envied than to be pitied.

  4. The very ink with which history is written is merely fluid prejudice.

  5. That's one small step for man, one giant leap for mankind.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s