在Android设备上调试时,无法再设置/使用断点

时间:2017-08-11 10:22:37

标签: visual-studio xamarin visual-studio-2015 xamarin.android xamarin.forms

我想在Android设备上调试Xamarin.Forms应用。如果我设置断点,我会从Visual Studio收到此错误消息:

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)。

0 个答案:

没有答案