Browse Source

Fixed SD2-1085: Debugger throws exception trying to copy an overflowed variable value

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1809 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
f9a634ddc2
  1. 8
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs

8
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs

@ -8,6 +8,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
using Debugger; using Debugger;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -122,9 +123,14 @@ namespace ICSharpCode.SharpDevelop.Services
try { try {
val.Primitive = newValue; val.Primitive = newValue;
} catch (NotSupportedException) { } catch (NotSupportedException) {
string format = ResourceService.GetString("MainWindow.Windows.Debug.LocalVariables.CannotSetValue"); string format = ResourceService.GetString("MainWindow.Windows.Debug.LocalVariables.CannotSetValue.BadFormat");
string msg = String.Format(format, newValue, val.ManagedType.ToString()); string msg = String.Format(format, newValue, val.ManagedType.ToString());
MessageService.ShowMessage(msg ,"${MainWindow.Windows.Debug.LocalVariables.CannotSetValue.Title}"); MessageService.ShowMessage(msg ,"${MainWindow.Windows.Debug.LocalVariables.CannotSetValue.Title}");
} catch (COMException) {
// COMException (0x80131330): Cannot perfrom SetValue on non-leaf frames.
// Happens if trying to set value after exception is breaked
MessageService.ShowMessage("${MainWindow.Windows.Debug.LocalVariables.CannotSetValue.UnknownError}",
"${MainWindow.Windows.Debug.LocalVariables.CannotSetValue.Title}");
} }
} }

Loading…
Cancel
Save