---
title: Debugging
---

When working with many events, it can become difficult to ensure everything is working as intended. To help, Mixson
includes several resources for debugging.

The `DebugOption` enum includes several options for debugging. The enum is defined as follows:
```java
public enum DebugOption {
    EXPORT_PATCHED_FILE,
    EXPORT_UNPATCHED_FILE,
    BASIC_LOGGING,
    EXTRA_LOGGING
}
```

The `EXPORT_PATCHED_FILE` option will export a copy of the resource file each time an event associated with it runs.

The `EXPORT_UNPATCHED_FILE` option will export a copy of the resource file before any events associated with it run.

The `BASIC_LOGGING` option will log each time an event operates on an individual resource, as well as when an event or
reference is registered.

The `EXTRA_LOGGING` option will log when an event starts, whether it operates on any files or not, the time it takes to
operate on each file, as well as how long it takes for the event to finish processing.

---

The `DebugOption`s can be enabled by calling the method `Mixson#enableDebugOption`, which has a signature as follows:
```java
public static void enableDebugOption(DebugOption option);
```

Once an option is enabled, it cannot be disabled until Minecraft is restarted.

<Callout variant = "warning">
    Debug Options are not automatically disabled outside of the dev environment.
</Callout>