visual-studio 如何更改默认浏览器以在 Visual Studio 2008 中进行调试?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/297298/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change the default browser to debug with in Visual Studio 2008?
提问by Paul Rowland
When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008?
当你按下 F5 时,会弹出浏览器窗口,你如何在 Visual Studio 2008 中设置调试器用户使用哪个浏览器?
Update 1
I have looked for the 'Browse with' option and not found it.
Visual Studio opens the default browser instead of Internet Explorer
更新 1
我寻找了“浏览方式”选项,但没有找到。
Visual Studio 打开默认浏览器而不是 Internet Explorer
Update 2
If you are already debugging you dont have the 'Browse with' option.
更新 2
如果您已经在调试,则没有“浏览方式”选项。
- Stop debugging and then its there!
- 停止调试,然后它就在那里!
Update 3
The accepted answer below is also relevant to changing the default browser to debug with in Visual Studio 2010.
更新 3
下面接受的答案也与更改默认浏览器相关,以便在 Visual Studio 2010 中进行调试。
回答by bdukes
- (In the Project Solution window) Right click a page (.aspx, or on a folder)
- Select Browse With...
- Choose your browser
- Click Set as Default
- Click Browse
- (在“项目解决方案”窗口中)右键单击页面(.aspx 或文件夹上)
- 选择浏览方式...
- 选择您的浏览器
- 点击设为默认
- 点击浏览


回答by Dunc
ASP.NETprojects:
ASP.NET项目:
- Right click a webpage (.aspx, or on a folder)
- Select Browse With...
- Choose your browser
- Click Set as Default
- Click Browse
- 右键单击网页(.aspx,或在文件夹上)
- 选择浏览方式...
- 选择您的浏览器
- 点击设为默认
- 点击浏览
ASP.NET MVC 1projects:
ASP.NET MVC 1项目:
Right click Default.aspx, then follow steps above.
右键单击 Default.aspx,然后按照上述步骤操作。
ASP.NET MVC 2projects:
ASP.NET MVC 2项目:
As there is no Default.aspx, you need to create a Web Form (right-click project > Add > New Item) and follow the steps above.
由于没有 Default.aspx,您需要创建一个 Web 窗体(右键单击项目 > 添加 > 新项)并按照上述步骤操作。
回答by PRINCESS FLUFF
If you use ASP-NET MVC, you need to right-click on Default.ASPX which will have a Browse With menu.
如果您使用 ASP-NET MVC,您需要右键单击 Default.ASPX,它将有一个 Browse With 菜单。
回答by Matthew Lock
To permanently make Visual Studio open a project in IE without changing the default browser you can do the following:
要在不更改默认浏览器的情况下永久使 Visual Studio 在 IE 中打开项目,您可以执行以下操作:
Project Properties -> Web -> Start Action
Project Properties -> Web -> Start Action
Start external program: C:\Program Files\Internet Explorer\iexplore.exe Command line arguments: Enter the url of the path to your start page ie http:\localhost\myproject\default.aspx
启动外部程序:C:\Program Files\Internet Explorer\iexplore.exe 命令行参数:输入起始页路径的 url,即 http:\localhost\myproject\default.aspx
This won't allow you to debug client side script in Visual Studio though.
但是,这将不允许您在 Visual Studio 中调试客户端脚本。
回答by PHOTON
If you are using MVC 2 you do not need to create another project, just add component -> webform to the project then:
如果您使用的是 MVC 2,则不需要创建另一个项目,只需将 component -> webform 添加到项目中,然后:
* Right click the webform * Select Browse With... * Choose your browser * Click Set as Default * Delete the webform
* Right click the webform * Select Browse With... * Choose your browser * Click Set as Default * Delete the webform
回答by EricSch
If you use MVC, you don't have this menu (no "Browse With..." menu)
如果您使用 MVC,则没有此菜单(没有“浏览方式...”菜单)
Create first a normal ASP.NET web site.
首先创建一个普通的 ASP.NET 网站。
回答by user1653670
I have passed this problem in VS2012. When I can't find "Browse with.." on the right-click of the project, I found it on File Menu -> Browse with. If it doesn't appear, first you have to click on menu bar, then try open file menu again. If it still doesn't appear, you can just go to Quick Launch on the top right of menu bar then type it "Browse with".
我已经在 VS2012 中通过了这个问题。当我在项目的右键单击中找不到“浏览方式..”时,我在文件菜单 - > 浏览方式中找到了它。如果没有出现,首先您必须单击菜单栏,然后再次尝试打开文件菜单。如果它仍然没有出现,您可以转到菜单栏右上角的快速启动,然后键入“浏览方式”。
回答by Ken
I find that the Browse With..menu item only appears in Visual Studio 2010 when I Run as administrator. And in that case it is available even while in debug mode.
我发现Browse With..菜单项只出现在 Visual Studio 2010 中,当我Run as administrator. 在这种情况下,即使在调试模式下它也可用。
回答by Andy Braham
An easier way to do this is simply by selecting the arrow next to the Start Debugging:
一种更简单的方法是选择“开始调试”旁边的箭头:
Then in the Drop Down goto Web Browserand select the browser you would like to debug the site with, you can also select Browse with...to set the default as explained in other answers.
然后在下拉菜单中Web Browser选择您想用来调试站点的浏览器,您也可以选择Browse with...设置默认值,如其他答案中所述。
回答by Jitender Kumar
In VS 2010 just make the browser as your default broswer in which you want to run your application and there is no need to set anything in visual studio. I did it for google chrome and its working for me. I just made google chrome as my default browser and its working fine. I am almost sure that this should work in VS 2008 also.
In VS 2010 just make the browser as your default broswer in which you want to run your application and there is no need to set anything in visual studio. 我是为谷歌浏览器做的,它对我有用。我刚刚将谷歌浏览器设为我的默认浏览器,并且运行良好。我几乎可以肯定这也应该适用于 VS 2008。

