> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Rules

> Debug an Auth0 Rule using `console.log` output surfaced through the Rules Editor Save and Try feature, Actions Real-time Logs, or the legacy Debug Rule CLI.

> [!WARNING]
>
> **Rules will reach end of life (EOL) on January 31, 2028.**
>
> * As of October 16, 2023, Rules are no longer available in newly created tenants.
> * As of November 18, 2024, Rules are read-only. Active Rules still run, and you can enable or disable them and change their configuration values and secrets. You can't edit their code in the Dashboard, the Management API, or tools that use it, such as the Auth0 CLI, Deploy CLI, Terraform, and Agent Skills.
> * **After January 31, 2028, Rules stop running and are removed.**

**Use Actions to extend Auth0:**

* To learn more about Actions, read [Understand How Auth0 Actions Work](https://auth0.com/docs/customize/actions/actions-overview.md).
* To migrate, read [Migrate from Rules to Actions](https://auth0.com/docs/customize/actions/migrate/migrate-from-rules-to-actions.md).

> [!WARNING]
>
> We expose IPv6 addresses in our public endpoints (e.g., `travel0.us.auth0.com`). If a request arrives from a machine that supports IPv6, then the `context.request.ip` property will contain an IPv6 address. If you perform manual IP address manipulation, we suggest you use the [ipaddr.js@1.9.0 library](https://www.npmjs.com/package/ipaddr.js/v/1.9.0).

To debug any [Auth0 Rule](https://auth0.com/docs/customize/rules.md) you have created, you can use `console.log` from within your rule code. You can see `console.log` output by using the **Save and Try**, viewing the logs available with the [Actions Real-time Logs](https://auth0.com/docs/customize/actions/actions-real-time-logs.md), or for legacy clients, using the [Debug Rule CLI](#debug-rule-cli).

![Dashboard - Auth Pipeline - Rules - Edit Rule](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/cdy7uua7fh8z/5CoC6cnazv2uT1iSq6OGsm/6cb30d9479971be771313da80acc4802/Dashboard_-_Auth_Pipeline_-_Rules_-_Edit_Rule.png)

## Try this Rule

In the [Rules Editor](https://manage.auth0.com/#/rules/create), the **Save and Try** button lets you run a Rule in isolation with mock **user** and **context** objects. Clicking **TRY** will run the Rule with those two objects as input and will display any `console.log` output.

The **Try this rule script** feature functions outside a specific client context. When using this feature, you may run into issues if your Rule depends on data that would be provided when called from an actual application.

![Auth0 Pipeline - Rules - Try this rule](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/cdy7uua7fh8z/4scLIFzI1isvJZ9UI6mHfR/eceb674d3a53ecbab1bd9835a5194012/Auth_Pipeline_-_Rules_-_Try.png)

## Actions Real-time Logs

The Actions Real-time Logs displays all logs in real-time for all custom code in your account, which includes all `console.log` output and exceptions. To learn more, read [Actions Real-time Logs](https://auth0.com/docs/customize/actions/actions-real-time-logs.md).
