From 996561350744585f6720ec4fc09f7173959c0f36 Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 9 Jun 2024 21:50:10 -0700 Subject: [PATCH] docs: add dev flag --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 80bf5e6..36ba026 100644 --- a/README.md +++ b/README.md @@ -391,6 +391,18 @@ remotes.requestState.connect((player) => { --- +## 🚧 Development + +Charm provides a debug mode to help you identify potential bugs in your project. To enable debug mode, set the global `_G.__DEV__` flag to `true`. + +Currently, the debug flag enables the following checks: + +- Molecules, listeners, and batched functions are not allowed to yield, and will throw an error if they do. + +- Server state is validated before sending to clients. If the state is not serializable, an error will be thrown. A list of common cases can be found in the [source code](src/__tests__/sync/validate.spec.luau). + +--- + ## 🚀 Examples ### Counter atom