Visual Studio 2012 change web browser

2019-01-23 22:22发布

If I click control-click a hyperlink in the text editor, it opens the URL in a new Visual Studio tab. I would rather the link open outside Visual Studio in my system's default web browser (happens to be Google Chrome). How can I arrange this?

I'm talking about hyperlinks in code comments.


I am using Visual Studio 2012. I found a similar question dated 2009, however the accepted answer (a macro) doesn't work in Visual Studio 2012.

11条回答
别忘想泡老子
2楼-- · 2019-01-23 22:48

Frustratingly, this isn't possible in Visual Studio 2012 or 2013.

Bug reported to developers at http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2723548-open-links-in-an-actual-browser Please add your vote!

查看更多
Summer. ? 凉城
3楼-- · 2019-01-23 22:48

There is an extension Open in External Browser. I'm using Visual Studio 2013 Professional. It works for me.

To install:

  1. Go to "Tools" - "Extension and Updates..."
  2. Choose "Online" - "Visual Studio Gallery" on left pane
  3. Type in search field "open in external browser"
  4. Click "Install"
查看更多
Bombasti
4楼-- · 2019-01-23 22:49

I found a way to change the default browser for all actions in Visual Studio Express 2012 for Web. It's documented here:

By default, Visual Studio uses your default browser to test pages. To use a different browser or Page Inspector, right-click [an .aspx] page in [the] Solution Explorer and then click [...] Browse With [, which] lets you select a browser from a list, add new browsers to the list, or set one as the default browser. (The default browser setting here applies only to the Visual Studio environment and not to Windows.)

This also changes the default browser for F5'ing an MVC project, because I'm used to closing IE to stop debugging. When I let Visual Studio use my system's default browser, I first have to switch back to it from my browser to stop debugging, because closing the browser tab doesn't.

Unfortunately it still doesn't open links in comments in a browser.

查看更多
啃猪蹄的小仙女
5楼-- · 2019-01-23 22:54

Go thru this setting...

enter image description here

Hope this will help you

查看更多
老娘就宠你
6楼-- · 2019-01-23 23:07

It seems that it is not possible (except if your default browser is IE, so you would not know the difference).

As Anand wrote above, you could ctrl + right click on the link and then select open link in external window (you cannot do that on the start page, only on an opened webpage) but it still opens the window in IE no matter what your default browser is.

Even if you go to TOOLS --> Options --> Environment --> Web Browser, you will notice that it indicated that IE and the internal VS web browser are siblings.

So just copy the URL from the address bar and paste it to your default browser (it's not too much trouble in my opinion).

查看更多
登录 后发表回答