If there is a URL in a source file comment, I can "CTRL + click to follow link." However, when I do this, the link opens inside Visual Studio. How can I make it open in my web browser--in my case, Google Chrome?
views:
621answers:
4
A:
In VS2008 , just right click on the link and select "Open link in external window". You have to select Chrome as your default browser.
backslash17
2009-07-29 17:32:05
I thought of this too, but it does not apply to links directly in the source code, only to links in, say, the Help.
Matthew Jones
2009-07-29 17:33:26
You're right only links in the internal navigator not in the source code pane.
backslash17
2009-07-29 17:37:33
-1 does not answer the question. :-)... If anyone has a solution that does not involve right click menu or CTRL click that would be even better :-)
Myster
2009-11-26 03:57:23
A:
There is a full description of a solution here: http://stevenharman.net/blog/archive/2007/08/02/setting-a-default-browser-for-visual-studio.aspx
There is a handy link for VS2005 half way down by capgpilk
System.Exception
2009-11-30 23:04:32
That only deals with running HTML pages, right? Not links in the text editor? Or am I missing something?
Roger Lipscombe
2010-03-21 19:52:24
+2
A:
I could not find a setting for this so I wrote a simple macro that you can use. You can bind this to a key-combo like all macros. This will get the job done until we get a better answer.
Sub OpenURLInChrome()
'copy to end of line
DTE.ActiveDocument.Selection.EndOfLine(True)
'set var
Dim url As String = DTE.ActiveDocument.Selection.Text
'launch chrome with url
System.Diagnostics.Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\Google\Chrome\Application\chrome.exe", url)
End Sub
Just put your cursor in front of the url and run the macro...
mracoker
2010-03-22 15:05:13
I don't have VB installed but it looks like it'll work (if there is nothing at the end of the line past the URL), plus I hate having un-answered questions, so marking as answer. Thanks for your help :)
Sam Pearson
2010-03-22 20:53:31
@Sam: You don't need VB installed to use Visual Studio macros. They just use the same syntax.
Roger Lipscombe
2010-03-23 09:11:05