How to add Edge as my debug browser in Visual Studio 2012 on Windows 10?

亡梦爱人 提交于 2019-12-08 19:10:54

问题


I upgraded my laptop to Windows 10 yesterday. I want to be able to use MS Edge when I debug my code in Visual Studio 2012.

I can't find the browser executable nor do I know if I need any special command line parameters necessary to make it work right.

Any hints or tips on this?


回答1:


You can add Microsoft Edge to your browser list to run directly into Microsoft Edge browser. As you can see click on browser switcher as in below image and click on "Browse With...".

Now click on Add button

and type "C:\WINDOWS\system32\LaunchWinApp.exe" into Program input, leave Argument as blank and type appropriate friendly name and hit Okay.




回答2:


I can't help with the location for the Edge executable, nor with command lines execution, but here is a work-around to get you started;

Hit F5 to start your application in your default browser, then copy+paste the respective URL from your default browser into Edge.

The requests that you submit from Edge to your URL are still processed by your development "server" - this is where your debugger will be attached, so your server-side breakpoints will still get triggered.

This will work for IIS and IIS Express.




回答3:


C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe

is the location of microsoft Edge.

You can get this location from Task manager->Microsoft Edge> Properties




回答4:


This worked fine but I had a problem getting Edge to browse my localhost where I do my web site development. Turns out Edge is locked down by default to not allow browsing to localhost.

To fix this, fire up Fiddler (or install it then fire it up), the click on the WinConfig button in the main toolbar of Fiddler. You'll see the AppContainer Loopback Exemption Utility. Find Microsoft Edge in the list, click the check box next to it, and click Save.

Like magic Edge should now load your site on localhost.

https://binary-stuff.com/post/browsing-localhost-with-the-microsoft-edge-browser



来源:https://stackoverflow.com/questions/31794639/how-to-add-edge-as-my-debug-browser-in-visual-studio-2012-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!