Xamarin Profiler 无法连接和来自 VS2015 的 运行 iOS 应用程序

Xamarin Profiler fails to connect and run iOS app from VS2015

我正在尝试分析 iOS 应用程序以诊断内存泄漏。当我尝试从 Visual Studio 运行 Xamarin Profiler 时,应用程序可以编译并部署到设备上,但是在加载 Profiler 并且我 select 监视哪些位时它会暂停然后报告 "Sorry, something went wrong trying to run ***"。日志输出如下:

INFO[2016-07-15 11:24:47Z]: ##########################################
INFO[2016-07-15 11:24:47Z]: # Xamarin Profiler version -  0.33.2.2
INFO[2016-07-15 11:24:47Z]: #  * Arch x86_64
INFO[2016-07-15 11:24:47Z]: ##########################################
DEBUG[2016-07-15 11:24:47Z]: processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=ios --target=*** --device=Device lab iPhone 6 Plus --options=host:10.1.5.85,port:51759,user:simonh,name:Device lab iPhone 6 Plus,mode:usb
DEBUG[2016-07-15 11:24:52Z]: instrument added
DEBUG[2016-07-15 11:24:52Z]: instrument added
DEBUG[2016-07-15 11:24:52Z]: instrument added
INFO[2016-07-15 11:24:52Z]: Creating ios run for *** target on device Device lab iPhone 6 Plus
DEBUG[2016-07-15 11:24:52Z]: Progress report initialized successfully
DEBUG[2016-07-15 11:24:52Z]: Connecting to 10.1.5.85 as simonh
DEBUG[2016-07-15 11:24:52Z]: Connecting to Xamarin Mac agent at 10.1.5.85
INFO[2016-07-15 11:24:53Z]: StartRecording for ***
DEBUG[2016-07-15 11:25:03Z]: Registering profiler12756simon as XMA client
DEBUG[2016-07-15 11:25:03Z]: Deploying profiler agent to 10.1.5.85
DEBUG[2016-07-15 11:25:15Z]: Starting listener on port 51759
DEBUG[2016-07-15 11:25:15Z]: Getting connection from Mac remote agent
DEBUG[2016-07-15 11:25:16Z]: Got response from agent: Run cae2ff15-faf5-406a-9ce7-*** (/*** on Device lab iPhone 6 Plus) started with heapshot=ondemand,alloc,nocalls,maxframes=8,sample=cycles/1000, 
ERROR[2016-07-15 11:25:16Z]: error occured on run *** couldn't establish connection to device Device lab iPhone 6 Plus
ERROR[2016-07-15 11:25:16Z]: Error occured on run ***: couldn't establish connection to device Device lab iPhone 6 Plus
INFO[2016-07-15 11:25:16Z]: StopRecording for ***
DEBUG[2016-07-15 11:25:16Z]: Remote App stopped : cae2ff15-faf5-406a-9ce7-***
DEBUG[2016-07-15 11:25:16Z]: Remote App stopped : cae2ff15-faf5-406a-9ce7-***
DEBUG[2016-07-15 11:25:16Z]: Stopping profiler log reader
DEBUG[2016-07-15 11:25:16Z]: Stopping profiler log reader
ERROR[2016-07-15 11:25:16Z]: error occured on run *** Error on XMA listener: System.NullReferenceException: Object reference not set to an instance of an object.
   at XamarinProfiler.Core.Platforms.ProfileIosXmaRun.AcceptClient()
DEBUG[2016-07-15 11:25:16Z]: Stopping profiler log reader

我正在 运行使用完全更新的企业版 Visual Studio 2015 U3 和 Windows 8.1 上的最新稳定 Xamarin 工具,以及 Xamarin Studio 上的最新稳定工具MacBook Pro 运行ning OSX 10.11.5,以及最新的 Xamarin Profiler。我的测试设备是 iPhone 6 Plus 运行ning iOS 9.3.2。设置正常运行良好,完全调试等,没有问题。

欢迎任何帮助!

目前这是一个已知问题。我们确实有一个错误报告,但它是内部的,所以很遗憾我不能分享任何细节。

我建议现在直接在您的 Mac 上试用 Profiler - 或者使用 Instruments:

https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/using_instruments_to_detect_native_leaks_using_markheap/

https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/walkthrough_Apples_instrument/