From 06f47d21ca135bf67075d609da489fdfbee0256b Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Wed, 11 Oct 2023 13:23:18 -0500 Subject: [PATCH] Make InterpreterObject default to printing actual values --- .../Iris/Debug/Data/InterpreterObject.cs | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/UIX/Microsoft/Iris/Debug/Data/InterpreterObject.cs b/UIX/Microsoft/Iris/Debug/Data/InterpreterObject.cs index 6e1c5f1..f7be19e 100644 --- a/UIX/Microsoft/Iris/Debug/Data/InterpreterObject.cs +++ b/UIX/Microsoft/Iris/Debug/Data/InterpreterObject.cs @@ -57,7 +57,7 @@ public class InterpreterObject return sb.ToString(); } - public void ToString(StringBuilder sb, bool includeType = false) + public void ToString(StringBuilder sb, bool includeType = false, bool includeSource = false) { if (includeType) { @@ -65,16 +65,23 @@ public class InterpreterObject sb.Append(' '); } - if (Source == InstructionObjectSource.Inline) - sb.Append(Value ?? "NULL"); - else - sb.Append(Source); - - if (TableIndex != -1) + if (includeSource) { - sb.Append('['); - sb.Append(TableIndex); - sb.Append(']'); + if (Source == InstructionObjectSource.Inline) + sb.Append(Value ?? "NULL"); + else + sb.Append(Source); + + if (TableIndex != -1) + { + sb.Append('['); + sb.Append(TableIndex); + sb.Append(']'); + } + } + else + { + sb.Append(Value ?? "NULL"); } } }