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 ;
@@ -784,10 +786,17 @@ item.Target is ShowMoreValuesObjectValueNode ||
784786 var objVal = item . Target . GetDebuggerObjectValue ( ) ;
785787
786788 if ( objVal != null ) {
787- // HACK: we need a better abstraction of the stack frame, better yet would be to not really need it in the view
788- var opt = DebuggerService . Frame . GetStackFrame ( ) . DebuggerSession . Options . EvaluationOptions . Clone ( ) ;
789- opt . EllipsizeStrings = false ;
790- value = '"' + Mono . Debugging . Evaluation . ExpressionEvaluator . EscapeString ( ( string ) objVal . GetRawValue ( opt ) ) + '"' ;
789+ try {
790+ // HACK: we need a better abstraction of the stack frame, better yet would be to not really need it in the view
791+ var opt = DebuggerService . Frame . GetStackFrame ( ) . DebuggerSession . Options . EvaluationOptions . Clone ( ) ;
792+ opt . EllipsizeStrings = false ;
793+
794+ var rawValue = ( string ) objVal . GetRawValue ( opt ) ;
795+
796+ value = '"' + Mono . Debugging . Evaluation . ExpressionEvaluator . EscapeString ( rawValue ) + '"' ;
797+ } catch ( EvaluatorException ) {
798+ // fall back to using the DisplayValue that we would have used anyway...
799+ }
791800 }
792801 }
793802
You can’t perform that action at this time.
0 commit comments