# Emulator

When your bot does not behave as expected, you need to investigate and identify the issue—also known as debugging. But where should you start? How can you determine the cause of the problem? This article covers the basics of debugging inside the Chatlayer Emulator.&#x20;

## Test your bot in the Emulator

To open your Emulator:

1. Under the [**Bot builder**](/navigation/bot-builder.md) tab, click on [**Flows**](/navigation/bot-builder/flows.md).
2. Find the **play** button in the upper right corner of the screen and click on it.

<figure><img src="/files/w63F2NcTaMN8Tb0D7niL" alt="" width="339"><figcaption><p>Open the Emulator by clicking on the play button in the upper-right corner of your canvas.</p></figcaption></figure>

3. Test your bot by typing in the input field.&#x20;

<figure><img src="/files/Fxkasf5ZZlKmPhQTAVJ7" alt="" width="375"><figcaption><p>Test your bot in the Emulator.</p></figcaption></figure>

4. To restart the test conversation, click on the **restart** button at the top right corner of the window.

<figure><img src="/files/1hSHJimFUvMucH7ZahbM" alt="" width="375"><figcaption></figcaption></figure>

## Test modes

Your Emulator has 3 different modes of testing that can be set from the upper part of the window.

<figure><img src="/files/atFUkCKwuTngxZEMwpVC" alt="" width="375"><figcaption><p>3 available modes of testing inside your Emulator.</p></figcaption></figure>

### Debugger

This is useful if you would like to debug your chatbot. For a most comprehensive guide to debugging, check this page:

{% content-ref url="/pages/-LbwglccNy56zkITA7QE" %}
[Debug your bot](/support/solving-bot-issues.md)
{% endcontent-ref %}

### Voice

This is the mode to test your voicebot if you have one.

{% content-ref url="/pages/bTkWmYB7tYjzfCt3QXjK" %}
[Test your voicebot](/voice/phone-and-voice/test-your-voicebot.md)
{% endcontent-ref %}

### WhatsApp Sandbox

This is a test window to [test your bot on a WhatsApp channel](https://docs.chatlayer.ai/start-quickly/leadzy-tutorial/1.-new-bot-new-block#run-tests-in-the-whatsapp-sandbox).

## Debug your bot

To debug your bot conversation:&#x20;

1. Click on **Debugger** next the bubble chat.

<figure><img src="/files/N6omEcKLAftPaRoJQ0Mt" alt="" width="375"><figcaption><p>Click 'debug' icon to open the debugger modal</p></figcaption></figure>

2. An **Inspector** window opens. In this Inspector, you can check the user [**Session data**](/bot-answers/session.md).

<figure><img src="/files/DgxDKDKeruYLKDpyCtSs" alt="" width="563"><figcaption><p>Test emulator with debugger side modal</p></figcaption></figure>


---

# 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.chatlayer.ai/buildabot/emulator.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.
