import "effector/enable_debug_traces";

A special import that enables detailed traces for difficult-to-debug errors, such as a Store missing a proper SID during Scope serialization.

Performance cost

Debug traces work by capturing additional information when Stores and Events are created. This introduces a performance overhead during module initialization.

We do not recommend using this API in production environments.

Debug Trace import

To enable debug traces, add import "effector/enable_debug_traces" to the entrypoint of your bundle, like this:

src/index.ts
import "effector/enable_debug_traces";
// ...rest of your code

When to use it

If you encounter an error that can be diagnosed with this API, you will see a recommendation in the console: Add "import 'effector/enable_debug_traces'" to your code entry module to see full stack traces.

Don’t forget to remove this import once the issue has been resolved.

Contributors