# Printing to the console

To print to the console we use the unity `Debug` class as shown below.

```csharp
Debug.Log("This is a simple log.");
Debug.LogAssert("This is an assert...");
Debug.LogError("This is an error...");
Debug.LogException("This is an exception...");
Debug.LogWarning("This is a warning...");
Debug.Log(new Vector3(0,0,0));
Debug.Log(myvalue);
```

{% hint style="warning" %}
When using the System namespace its Debug class might do some weird stuff.\
\
**You can use**\
\&#xNAN;**`UnityEngine.Debug.Log()`** \
**or simply add**\
\&#xNAN;**`using Debug = UnityEngine.Debug;`** \
**at the top of your class after the imports.**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.greenhellmodding.com/client-code-examples/printing-to-the-console.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
