I recently discovered that I could view a browser window in the Visual Studio IDE by going to
View → Other Windows → Web Browser. While I found that useful, I recently came across a situation in which I wanted more than one web page in the IDE. It took some time, but I eventually figured out there are several ways to do this:
- Open a web browser tab, then go to Windows → New Window. This will spawn a second web browser tab.
- Open a web browser tab, navigate to a website (e.g., Google), right click a link and select Open Link in New Window.
- Open a web browser tab, then navigate to an HTML file on your hard drive with multiple frames. That HTML file might contain, for example, the following:
<html>
<head>
<title>Multiple Webpages</title>
</head>
<frameset cols="50%, 50%">
<frame src="http://www.google.com/">
<frame src="http://www.microsoft.com/">
</frameset>
</html>
Here are some advantages and disadvantages to each approach above:
- This first option is the easiest. Although it does add extra tabs to your IDE, which can make it take longer to look through your other code tabs.
- This second option works best if you don't like messing with the menu options in the IDE.
- This third option reduces the number of tabs you use. Also, you can drag the separators between pages to focus on one page at a time by making it bigger. However, some websites that require a login will not work, probably becuse they require cookies. And some websites (e.g., Code Project) will remove the frames and load themselves instead.
I find this ability to be useful because it reduces the number of windows in my taskbar. I'm learning JavaScript, so I like to have an HTML page loaded in Visual Studio to try out JavaScript. I also like to have a PDF eBook loaded into a web browser tab in the IDE. And, finally, I have the JavaScript page on my personal wiki open in yet another web browser tab in the IDE, so that I can take notes. This makes learning JavaScript organized and interactive, but I'm sure there are a ton of other uses for multiple IDE web browser tabs.