0

我想在Android设备上调试Xamarin.Forms应用程序。如果我设置一个断点我从Visual Studio收到此错误信息:在Android设备上进行调试时,无法再设置/使用断点

Exception from Visual Studio

这是控制台的输出

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. 
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection. 
    at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count) 
    at Mono.Cecil.Metadata.GuidHeap.Read(UInt32 index) 
    at Mono.Cecil.MetadataReader.InitializeCustomDebugInformations() 
    at Mono.Cecil.MetadataReader.GetCustomDebugInformation(ICustomDebugInformationProvider provider) 
    at Mono.Cecil.Cil.PortablePdbReader.Read(MethodDefinition method) 
    at Mono.Cecil.Cil.CodeReader.ReadMethodBody() 
    at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method) 
    at Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader) 
    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read) 
    at Mono.Cecil.MethodDefinition.get_Body() 
    at Mono.Cecil.MethodDefinition.get_DebugInformation() 
    at Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbType(TypeDefinition type, Dictionary`2 fileToSourceFileInfos) 
    at Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbFile(String assemblyFileName, String pdbFileName) 
    at Mono.Debugging.Soft.SoftDebuggerSession.LoadDebugFile(String assemblyFileName, String debugFileName, Func`3 loadDebugFile) 
    at Mono.Debugging.Soft.SoftDebuggerSession.CheckBetterMatch(TypeMirror type, String file, Int32 line, Int32 column, Location found) 
    at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByMethod(MethodMirror method, String file, Int32 line, Int32 column, Boolean& insideTypeRange) 
    at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByType(TypeMirror type, String file, Int32 line, Int32 column, Boolean& genericMethod, Boolean& insideTypeRange) 
    at Mono.Debugging.Soft.SoftDebuggerSession.ResolveBreakpoints(TypeMirror type) 
    at Mono.Debugging.Soft.SoftDebuggerSession.HandleTypeLoadEvents(TypeLoadEvent[] events) 
    at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es) 
    at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler() 

如果我不设置应用程序似乎工作的任何断点一般。我的代码有问题吗?我正在使用最新的Xamarin.Forms(2.3.4.247)。

回答

相关问题