Enhanced Locals

(New in version 0.16.2)

This integration uses pure_eval to safely evaluate additional expressions in the source code and display their values alongside other local variables.

This integration is experimental. It may be removed in minor versions.

Python version 3.5 or greater is required.

To install dependencies, either pip install 'sentry-sdk[pure_eval]' or pip install pure_eval executing asttokens.

Add PureEvalIntegration() to your integrations list:

Copied
import sentry_sdk
from sentry_sdk.integrations.pure_eval import PureEvalIntegration

sentry_sdk.init("https://examplePublicKey@o0.ingest.sentry.io/0", integrations=[PureEvalIntegration()])