# Console

The built-in console is part of the editor and helps to investigate and resolve issues that occur when writing and executing actions. It is located in the footer at the bottom left-corner of the editor.

## Debugging actions

The console shows logs, errors and warnings that are registered within the actions of your app. If you have been working with dev tools in your browser before, the console will feel very familiar to you.

It support the following methods:

* [`console.clear()`](https://developer.mozilla.org/en-US/docs/Web/API/console/clear)
* [`console.debug()`](https://developer.mozilla.org/en-US/docs/Web/API/console/debug)
* [`console.error()`](https://developer.mozilla.org/en-US/docs/Web/API/console/error)
* [`console.info()`](https://developer.mozilla.org/en-US/docs/Web/API/console/info)
* [`console.log()`](https://developer.mozilla.org/en-US/docs/Web/API/console/log)
* [`console.warn()`](https://developer.mozilla.org/en-US/docs/Web/API/console/warn)

For example, if you want to log the current value of a variable, you can simply `console.log` the variable and inspect its content in the console.

<figure><img src="/files/yiXoOg41wVib8xDWBe2W" alt=""><figcaption></figcaption></figure>

Additionally, the console logs errors in your code and points to the respective action and line in the code. In this example, we have a syntax error, a missing closing parenthesis. The number of errors in the console are displayed next to its launcher. At the end of the error's line, the action and line is mentioned and you are directed to it upon clicking it.

<figure><img src="/files/xvmLMZzJmDtPmPDC33Ol" alt=""><figcaption></figcaption></figure>

The console can be cleared by clicking on the broom icon.

<figure><img src="/files/13znSPidBxfTuR6sONoc" alt=""><figcaption></figcaption></figure>

Additionally, the timestamps of the errors can be toggled on and off by marking the checkbox on the top left of the console.


---

# 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.uify.io/writing-code/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.
