> For the complete documentation index, see [llms.txt](https://mrgeneralq.gitbook.io/sleepmost/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrgeneralq.gitbook.io/sleepmost/guides/debugging-the-plugin.md).

# Debugging the plugin

If you have any issues with the plugin, a debug might be useful to figure out where it went wrong.

> **/sm debug**

{% hint style="info" %}
The debug list shows all players that do and don't have x flags, and is **included** or **excluded** in calculation of sleep. It narrows down to the players that gets included in the calculation.
{% endhint %}

{% hint style="info" %}
The players who appears **red** in a section, is excluded by calculation. The section explains why the player(s) is excluded.
{% endhint %}

![In-game debug](/files/rYtbY1H9TN3cEYLvTSMd)

![Console debug (some consoles also accepts colors, and will display similarly as In-game debug)](/files/OSWBYmWr7u5X165IMsNH)

Picture above shows all lines that appears upon debug. **Note:** Only those flags you have activated will appear in debug.&#x20;

For instance: the flag "use-afk" is set to true, making AFK-people excluded from calculation. In the photo you can see that player **Penalhus** turns red next to Non-AFK players. That player is therefore excluded in the sleep-calculation, and only **Villmarksjenta** is included.

{% hint style="danger" %}
A common error is people having the sleepmost.exempt permission or being OP. These players will appear inside the "Missing bypass permission" as **red**.
{% endhint %}

{% hint style="danger" %}
Another common error is having the flag "use-afk" set to true, but forget to add the Essentials placeholderAPI extension. (Only needed for those who use Essentials plugin for AFK) PlaceholderAPI and EssentialsX required.

* /papi ecloud download Essentials
* /papi reload

More info: [Configure AFK detection](/sleepmost/guides/configure-afk-detection.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://mrgeneralq.gitbook.io/sleepmost/guides/debugging-the-plugin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
