display variable value in red when evaluation failed
This commit is contained in:
@@ -304,6 +304,7 @@ public static class CachedColors
|
||||
public static readonly Color VariableBlue = new("9cdcfe");
|
||||
public static readonly Color Gray = new("a9a9a9");
|
||||
public static readonly Color Pink = new("c586c0");
|
||||
public static readonly Color ErrorRed = new("da5b5a");
|
||||
|
||||
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
||||
public static readonly Color RazorMetaCodePurple = new("a699e6");
|
||||
|
||||
@@ -34,6 +34,7 @@ public partial class ThreadsVariablesSubTab
|
||||
|
||||
var variableValueDisplayColour = variable switch
|
||||
{
|
||||
_ when variable.PresentationHint?.Attributes is { } attrs && (attrs & VariablePresentationHint.AttributesValue.FailedEvaluation) != 0 => CachedColors.ErrorRed,
|
||||
{ Value: "null" } => CachedColors.KeywordBlue,
|
||||
{ Value: "true" or "false" } => CachedColors.KeywordBlue,
|
||||
{ Type: "string" or "char" } => CachedColors.LightOrangeBrown,
|
||||
|
||||
Reference in New Issue
Block a user