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

回答

相關問題