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

# Debugging

Learn how to debug the Kakara Engine!

## Logging

The Kakara Engine logs information through a logger. It logs debug, warn, severe, and error information. In order for the logging to show up you must add a logger implementation. A good one to use is [log4j](https://logging.apache.org/log4j/2.x/) or [logback](https://logback.qos.ch/). You can use it through Maven or Gradle by adding it to your dependencies.

{% tabs %}
{% tab title="Gradle (Groovy)" %}

```groovy
compile "org.slf4j:slf4j-simple:1.8.0-beta4"
```

{% endtab %}

{% tab title="Gradle (Kotlin)" %}

```kotlin
compile("org.slf4j:slf4j-simple:1.8.0-beta4")
```

{% endtab %}

{% tab title="Maven" %}

```markup
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.8.0-beta4</version>
</dependency>
```

{% endtab %}
{% endtabs %}

After adding that logging should be enabled.

{% hint style="info" %}
If you are using Gradle, be sure to run your game through Gradle.
{% endhint %}

## LWJGL Debugging

If you want to debug any LWJGL operations you can use the following:

```java
// Debug Memory Allocator
Configuration.DEBUG_MEMORY_ALLOCATOR.set(true);

// Other LWJGL debug flags.
System.setProperty("org.lwjgl.util.Debug", "true");
System.setProperty("org.lwjgl.util.NoChecks", "false");
System.setProperty("org.lwjgl.util.DebugLoader", "true");
System.setProperty("org.lwjgl.util.DebugAllocator", "true");
System.setProperty("org.lwjgl.util.DebugStack", "true");
```

## JVM Crashes

Experiencing JVM crashes from OpenGL errors? Try out the [LWJGL Debugger](https://github.com/LWJGLX/debug).&#x20;

If the crash is from the Engine source code, please report a [JVM crash here](https://github.com/kakaragame/Engine/issues).
