【问题标题】:Visual Studio 2019 for Mac: debugger doesn't connect to iOS deviceVisual Studio 2019 for Mac:调试器无法连接到 iOS 设备
【发布时间】:2019-07-01 10:13:23
【问题描述】:

我正在尝试在全新的 MacBook Pro (Mojave) 上使用 Visual Studio 2019 调试一个长期存在的 Xamarin 应用程序。

解决方案构建、传输到设备并启动应用程序,但调试器不会通过电缆或 wifi 连接。 Visual Studio for Mac 中的虚拟项目也无法连接,但 xcode 中的虚拟项目可以。

VS 只是说“正在等待调试器通过 Wifi 连接到……端口 10000”

这是我的 VS 详细信息:

Visual Studio Community 2019 for Mac
Version 8.1.3 (build 19)
Installation UUID: 76ac8505-c20b-434f-95d4-c8266d3517f2
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)

    Package version: 518010028

Mono Framework MDK
Runtime:
    Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
    Package version: 518010028

NuGet
Version: 5.0.2.5988

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    3.0.0-preview6-27804-01
    2.1.11
    2.1.9
SDK: /usr/local/share/dotnet/sdk/3.0.100-preview6-012264/Sdks
SDK Versions:
    3.0.100-preview6-012264
    2.1.700
    2.1.505
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

Xamarin.Profiler
Version: 1.6.10
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Xamarin.Android
Not Installed

Microsoft Mobile OpenJDK
Java SDK: Not Found

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android Device Manager
Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC

Xamarin Designer
Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC

Apple Developer Tools
Xcode 10.2.1 (14490.122)
Build 10E1001

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin.iOS
Version: 12.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:47-0400

Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

Build Information
Release ID: 801030019
Git revision: 2d04b0145da8aa946d2cc9898fe2a59484e4f3f4
Build date: 2019-06-26 15:34:25+00
Build branch: release-8.1
Xamarin extensions: de240bddd6d1f96bfb1e7d11ce7ac5398956fe1d

Operating System
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
    Thu Apr 25 23:16:27 PDT 2019
    root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

帮助。

【问题讨论】:

  • 您是否尝试过在 Xcode 中对新项目进行 WiFi 调试?这行得通吗?
  • 是的,效果很好
  • 我最近也遇到了这个问题。它默默地失败了。您需要在按下开始后出现在底部的 Build Output 选项卡上查找错误
  • 感谢@iSpain17,这让我走上了正轨。我以为我已经弄清楚并安装了这些令人愤怒的配置文件/证书,但事实证明我又弄错了。 VS 隐藏错误没有帮助,但你做到了!如果您设置了答案,我会接受。
  • 乐于助人:)

标签: xamarin xamarin.ios visual-studio-mac


【解决方案1】:

遗憾的是,这些错误现在通常隐藏在 VS 2019 for Mac 中。您需要查看 Build Output 窗口来准确确定导致此故障的原因。

您描述的行为不属于特定类型的错误,它仅表示VS没有直观地显示其描述,而是因为尝试将构建放在物理设备上时运行过程失败而卡住了。

【讨论】:

  • 当你这么说的时候,我觉得自己像个白痴;-)
  • 这不是我的意图 :D 不幸的是 VS for Mac 和 Xamarin 的笨拙。
【解决方案2】:

首先,确保xcode和visual studio版本是最新的。

也试试

  1. 通过点击图标手动启动应用程序

  2. 从设备中删除应用并重新部署

  3. 重启设备

  4. 更改调试器端口

查看这个帖子:https://forums.xamarin.com/discussion/94088/xamarin-studio-waiting-for-debugger-to-connect-to-the-ios-simulator

【讨论】:

    猜你喜欢
    • 2021-06-12
    • 1970-01-01
    • 2020-04-21
    • 2017-03-06
    • 2021-06-03
    • 1970-01-01
    • 1970-01-01
    • 2019-01-03
    • 1970-01-01
    相关资源
    最近更新 更多