This repository was archived by the owner on Oct 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 3232using Foundation ;
3333using CoreGraphics ;
3434
35+ using Mono . Debugging . Evaluation ;
36+
3537using MonoDevelop . Core ;
3638using MonoDevelop . Ide . Commands ;
3739using MonoDevelop . Components . Commands ;
@@ -786,10 +788,17 @@ item.Target is ShowMoreValuesObjectValueNode ||
786788 var objVal = item . Target . GetDebuggerObjectValue ( ) ;
787789
788790 if ( objVal != null ) {
789- // HACK: we need a better abstraction of the stack frame, better yet would be to not really need it in the view
790- var opt = DebuggerService . Frame . GetStackFrame ( ) . DebuggerSession . Options . EvaluationOptions . Clone ( ) ;
791- opt . EllipsizeStrings = false ;
792- value = '"' + Mono . Debugging . Evaluation . ExpressionEvaluator . EscapeString ( ( string ) objVal . GetRawValue ( opt ) ) + '"' ;
791+ try {
792+ // HACK: we need a better abstraction of the stack frame, better yet would be to not really need it in the view
793+ var opt = DebuggerService . Frame . GetStackFrame ( ) . DebuggerSession . Options . EvaluationOptions . Clone ( ) ;
794+ opt . EllipsizeStrings = false ;
795+
796+ var rawValue = ( string ) objVal . GetRawValue ( opt ) ;
797+
798+ value = '"' + Mono . Debugging . Evaluation . ExpressionEvaluator . EscapeString ( rawValue ) + '"' ;
799+ } catch ( EvaluatorException ) {
800+ // fall back to using the DisplayValue that we would have used anyway...
801+ }
793802 }
794803 }
795804
You can’t perform that action at this time.
0 commit comments