Skip to main content

Debugging

You can enable debugging output in Prisma Client via the DEBUG environment variable. It accepts two namespaces to print debugging output:

  • prisma:engine: Prints relevant debug messages happening in a Prisma ORM engine
  • prisma:client: Prints relevant debug messages happening in the Prisma Client runtime
  • prisma*: Prints all debug messages from Prisma Client or CLI
  • *: Prints all debug messages
info

Prisma Client can be configured to log warnings, errors and information related to queries sent to the database. See Configuring logging for more information.

Setting the DEBUG environment variable

Here are examples for setting these debugging options in bash:

# enable only `prisma:engine`-level debugging output
export DEBUG="prisma:engine"

# enable only `prisma:client`-level debugging output
export DEBUG="prisma:client"

# enable both `prisma-client`- and `engine`-level debugging output
export DEBUG="prisma:client,prisma:engine"

To enable all prisma debugging options, set DEBUG to prisma*:

export DEBUG="prisma*"

To enable all debugging options, set DEBUG to *:

export DEBUG="*"