diff options
2 files changed, 14 insertions, 7 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs index 2e5e08f885..0ed6f75f22 100644 --- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs +++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs @@ -340,7 +340,7 @@ namespace MonoDevelop.Debugger.Soft TimeBetweenConnectionAttempts = 800, MaxConnectionAttempts = -1, }; - }; + } var dsi = new SoftDebuggerStartInfo (startArgs) { Command = StringParserService.Parse (command), diff --git a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs index 09930da9ee..d4bcc54d57 100644 --- a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs +++ b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs @@ -58,7 +58,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol this.frameId = frame.Id; } - static byte [] HexToByteArray (string hex) + static byte[] HexToByteArray (string hex) { if (hex.Length % 2 == 1) throw new ArgumentException (); @@ -69,14 +69,21 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol return bytes; } - static byte [] GetHashBytes (Source source) + static byte[] GetHashBytes (Source source) { if (source == null) return null; - var checkSum = source.Checksums.FirstOrDefault (c => c.Algorithm == ChecksumAlgorithm.SHA1); - if (checkSum == null) - return null; - return HexToByteArray (checkSum.ChecksumValue); + + foreach (var checksum in source.Checksums) { + switch (checksum.Algorithm) { + case ChecksumAlgorithm.SHA256: + case ChecksumAlgorithm.SHA1: + case ChecksumAlgorithm.MD5: + return HexToByteArray (checksum.ChecksumValue); + } + } + + return null; } public override string FullStackframeText { |