---
tags:
    - "Print"
    - "Console"
    - "Debug"
---

# Debug Log Error

[Debug](index.md) / **Debug Log Error**

## Description

Prints a text in red color in the Error channel of the Console

## Parameters

| Name | Description |
| :--- | :---------- |
| Text | The text to print |

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Debug Log Error")]
    [Image(typeof(IconAlertOctagon), ColorTheme.Type.Red)]
    
    [Description("Prints a text in red color in the Error channel of the Console")]
    [Category("Debug/Log Error")]
    
    [Parameter("Text", "The text to print")]
    
    [Keywords("Print", "Console", "Debug")]
    
    [Serializable]
    public class InstructionCoreDebugErrorText : Instruction
    {
        [SerializeField] private GetString m_Text = new GetString();

        protected override string GetTitle(GameObject source) => $"Error {this.m_Text}";

        protected override Awaitable Run(Args args)
        {
            Debug.LogError(this.m_Text.Get(args));
            return Done;
        }
    }
}
```

