【问题标题】:Hitting Visual studio breakpoints from a mac从 Mac 打 Visual Studio 断点
【发布时间】:2017-05-09 00:51:42
【问题描述】:

我已经搜索了很长时间,但我似乎找不到任何东西,除非我用谷歌搜索不正确。我发现的最接近的是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,该 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 扩展

【问题讨论】:

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


【解决方案1】:

好的,我偶然发现了另一个链接,看起来这种方式有效。这篇文章唯一没有说的就是将你的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 中,转到控制面板 > 系统 > 高级系统设置 > 计算机名称,然后单击更改。随意命名,例如视窗。重新启动您的虚拟机。 添加 ACL 规则以管理员身份打开 CMD 或 Powershell。在您选择的端口上为您的新名称添加 URL ACL 条目,例如

netsh http 添加 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 防火墙添加端口开放 TCP 8080 IISExpressWeb 启用全部

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


如果您使用的是 IIS,请打开 IIS 管理器,在 YourMachineName > Sites > YourSiteName 下找到您的站点。右键单击并选择 Edit Bindings...。使用您在步骤 1 中选择的主机名添加绑定,例如类型:http,IP 地址:All Unassigned,端口:8080,主机名:windows。点击确定。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-31
    • 2017-09-07
    • 1970-01-01
    • 2018-09-08
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    相关资源
    最近更新 更多