diff options
author | Greg Munn <gregm@microsoft.com> | 2019-11-25 22:45:25 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-11-26 18:18:03 +0300 |
commit | 796b7c57a16a2bd5d8382a639a22aaf352f9ecfb (patch) | |
tree | c9217bf2210a027351ac8b437aa0a290046c37f9 /main | |
parent | 1cd9905f28898d0e7de9122ed14807a3385d995f (diff) |
[Debugger] Handle NRE when adding a watch when not debugging
Fixes VSTS 1025766
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1025766
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs index 0183375d4f..e981f67eb0 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs @@ -413,7 +413,15 @@ namespace MonoDevelop.Debugger } LoggingService.LogInfo ("Evaluating expression '{0}'", expression); - var node = Frame.EvaluateExpression (expression); + + ObjectValueNode node; + if (Frame != null) { + node = Frame.EvaluateExpression (expression); + } else { + var value = ObjectValue.CreateUnknown (expression); + node = new DebuggerObjectValueNode (value); + } + AddValue (node); ExpressionAdded?.Invoke (this, new ExpressionAddedEventArgs (expression)); |