从mac访问Visual Studio断点

时间:2017-05-09 00:51:43

标签: ios xcode asp.net-web-api visual-studio-2015

我已经搜索过很久了,除非我谷歌搜索不正确,否则我似乎无法找到任何东西。我发现的最接近的是Need to debug my Web API service that's requested from a client machine - need help, how do I do this?

我正在我的Mac上创建一个iOS应用程序并运行一个Windows VM,其中我的C#WebAPI在localhost / IIS Express中运行。如何设置它以便我可以达到我的VS断点?

这似乎不起作用。我想我可能会遗漏一些东西。 https://codemilltech.com/code-mill-minute-debugging-with-visual-studio-but-not-from-windows/

我还尝试了一个名为Conveyor https://www.visualstudiogallery.msdn.microsoft.com/a429dbb7-a982-4541-b401-934375c02c0f

的Visual Studio扩展程序

1 个答案:

答案 0 :(得分:0)

好的,我偶然发现了另一个链接,看起来这种方式很有效。本文没有说的唯一内容是将您的IP添加到您的mac主机。我从上面的其他文章中得到了。

sudo nano / private / etc / hosts 10.211.55.5窗口

https://gist.github.com/justingarrick/6322779#file-iis_parallels_win8_mac-md

将在Parallels Windows 7/8 VM中运行的IIS或IISExpress暴露给您的OS X主机

重命名虚拟机在Windows 7/8 VM中,转到“控制面板”>系统>高级系统设置>计算机名称,然后单击更改用你喜欢的名字命名,例如:视窗。重启你的VM。 添加ACL规则以管理员身份打开CMD或Powershell。在您选择的端口上添加新名称的URL ACL条目,例如

netsh http add urlacl url = http://windows:8080/ user = everyone

添加防火墙规则以管理员身份打开CMD或Powershell。为此新端口添加入站防火墙规则。

在Windows 8中,语法为: netsh advfirewall防火墙添加规则名称=“IISExpressWeb”dir = in action = allow protocol = TCP localport = 8080

在Windows 7中,语法为: netsh防火墙添加portopening TCP 8080 IISExpressWeb启用所有

配置IIS绑定如果您正在使用IISExpress,请编辑applicationhost.config文件,该文件通常位于Documents \ IISExpress \ config \ applicationhost.config中。在网站下找到您的网站,并使用您的计算机名称添加绑定到该端口,例如


            如果您使用的是IIS,请打开IIS管理器,在YourMachineName>下找到您的站点。网站> YourSiteName。右键单击并选择Edit Bindings ....添加一个绑定,其中包含您在步骤1中选择的主机名,例如,键入:http,IP地址:全部未分配,端口:8080,主机名:windows。单击“确定”。

使用Visual Studio重新启动IIS / IISExpress启动IISExpress,或从IIS管理器重新启动IIS,并从Mac / VM主机上的浏览器中访问您的URL,例如: http://windows:8080 来源IIS Express enable external request IISExpress returns a 503 error from remote machines http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx