Xamarin表单:迁移到IOS无法在指定的IL偏移量上设置断点

问题描述

我正在尝试将在Android上运行良好的Xamarin Forms项目迁移到IOS。

为iOS进行构建时,我总是在Visual Studio上看到MessageWindow弹出窗口

    EXCEPTION: System.ArgumentException: Cannot set breakpoint on the specified IL offset. at Mono.Debugger.soft.VirtualMachine.ErrorHandler(Object sender,ErrorHandlerEventArgs args) in CMWs2017mb-043002M-1twork\144‘sWernal\debugger-libs\ Mono.Debugger.soft\Mono.Debugger.softWidualMachine.cs :line 373
 at 
Mono. Debugger.soft.Connection. SendReceive(CommandSet command set,Int32 command,PacketWriter packet) in CM\vs2017mb-00002M-1 twork\144\s \external \debugger-libs \ Mono.Debugger.softWono.Debugger.soft\Connection.csain e 1805 at Mono.Debugger.soft.Connection.EnableEvent(EventType etype,SuspendPolicy suspend_policy,List'1 mods) in CM\vs2017mb-00002M-1 twork \144V■external \debugger-fibs\ Mono.Debugger.softWono.Debugger.soft\Connedion.csain e 2682 at Mono.Debugger.soft.EventRequest.SendReq(List'1 mods) in CM■vs2017mb-00002M-1twork \144\s \external \debugger-libs \ Mono.Debugger.soMMono.Debugger.softEventRequest.cs:li ne 106 at Mono.Debugger.soft.BreakpointEventRequest.Enable0 in CMWs2017mb-00002M-1 twork‘,144\s \external \debugger-libs \ Mono.Debugger.softWono.Debugger.soft\BreakpointEventR equest.cs:line 25 at Mono.Debugging.soft.softDebuggerSessioninsedBreakpoint (Breakpoint bp,Breaklnfo bi,MethodMirror method,Int32 ilOffset) in CM\vs2017mb-00002M-1 twork \144\Aexternadebugger-libs '1 Mono.Debugging.soft\SoftDebuggerSession.cs:line 1197 at Mono.Debugging.soft.softDebuggerSession.ResolveFunction Breakpoint(BreakInfo bi,FunctionBreakpoint bp,MethodMirror method) in CM\vs2017mb-043002M-1\work\144‘s \edernal \debugger-fibs\ Mono.Debugging.soft\SoftDebuggerSession.cs:line 2676 at Mono.Debugging.soft.softDebuggerSession.ResolveBreakpoi nts(TypeMirror type) in C:NAWs2017mb-00002M-1\work\144\Aedernal\debugger-libs\ Mono.Debugging.softSoftDebuggerSession.csaine 2620 at Mono.Debugging.soft.softDebuggerSession.HandleTypeLoad EventsffypeLoadEventa events) in CM\vs2017mb-00002M-1\_work\144\AexternaKdebugger-libs\ Mono.Debugging.soft\SoftDebuggerSession.cs:line 2161 at Mono.Debugging.soft.softDebuggerSession.HandleEventSet( EventSet es) in CMWs2017mb-00002M-1\workV144‘s \e,dernal \debugger-fibs\ Mono.Debugging.soft\SoftDebuggerSession.cs:line 1690 at Mono.Debugging.soft.softDebuggerSession.EventHandlera in CMWs2017mb-00002M-1\work \144\s \external \debugger-libs \ Mono.Debugging.soft\SoftDebuggerSession.cs:line 1612 

任何想法是什么?我有一个Apple开发人员帐户,将应用程序部署到了iPhone。 启动后它只会失败,无法调试。

关闭错误消息框后,Visual Studio崩溃。

输出窗口中也有异常

2020-11-01 10:55:39.321 Xamarin.PreBuilt.iOS [4525:348114]警告:无法在MsFsG3000Emulator.iOS.Application中插入断点 (string []):0无法在指定的IL偏移量上设置断点。

System.ArgumentException:无法在指定的IL上设置断点 抵消。在Mono.Debugger.soft.VirtualMachine.ErrorHandler(Object 发送者,ErrorHandlerEventArgs args) C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugger.soft \ Mono.Debugger.soft \ VirtualMachine.cs:line 373在Mono.Debugger.soft.Connection.SendReceive(CommandSet command_set,Int32命令,PacketWriter数据包) C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugger.soft \ Mono.Debugger.soft \ Connection.cs:line 1805 at Mono.Debugger.soft.Connection.EnableEvent(EventType etype, SuspendPolicysuspend_policy,列出1 mods) in C:\A\vs2017mb-00002M-1\_work\144\s\external\debugger-libs\Mono.Debugger.soft\Mono.Debugger.soft\Connection.cs:line 2682 at Mono.Debugger.soft.EventRequest.SendReq(List 1个模块) C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugger.soft \ Mono.Debugger.soft \ EventRequest.cs:line 106在Mono.Debugger.soft.BreakpointEventRequest.Enable()中 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugger.soft \ Mono.Debugger.soft \ BreakpointEventRequest.cs:line 25点 Mono.Debugging.soft.softDebuggerSession.InsertBreakpoint(Breakpoint bp,BreakInfo bi,MethodMirror方法,Int32 ilOffset)中 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 1197年 Mono.Debugging.soft.softDebuggerSession.ResolveFunctionBreakpoint(BreakInfo bi,FunctionBreakpoint bp,MethodMirror方法)中 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 2676年 Mono.Debugging.soft.softDebuggerSession.ResolveBreakpoints(TypeMirror 输入 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 2620年 Mono.Debugging.soft.softDebuggerSession.HandleTypeLoadEvents(TypeLoadEvent [] 事件)中 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 2161年 中的Mono.Debugging.soft.softDebuggerSession.HandleEventSet(EventSet es) C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 1690在Mono.Debugging.soft.softDebuggerSession.EventHandler()中 C:\ A \ vs2017mb-00002M-1_work \ 144 \ s \ external \ debugger-libs \ Mono.Debugging.soft \ SoftDebuggerSession.cs:line 1612 [HotReload](2020-11-01 10:55:37.1):警告:StopHotReload:可以 找不到Xamarin.VisualStudio.IOS.MonoTouchDebuggerSession的项目 [HotReload](2020-11-01 10:55:37.1):信息:(MsFsG3000Emulator.iOS) 由于ExplicitlyEnded而停止了热加载会话... [HotReload] (2020-11-01 10:55:37.1):信息:停止热重装会话。该应用程序具有 已终止。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)