Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Debugging (Prisma ORM v7) (/docs/orm/v7/prisma-client/debugging-and-troubleshooting/debugging)

For the complete Prisma documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL.

This page explains how to enable debugging output for Prisma Client by setting the DEBUG environment variable

Location: ORM > v7 > Prisma Client > Debugging and Troubleshooting > Debugging

You can enable debugging output in Prisma Client and Prisma CLI 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

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

Here are examples for setting these debugging options in bash:

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*:

Bash
export DEBUG="prisma*"

On Windows, use set instead of export:

Bash
set DEBUG="prisma*"

To enable all debugging options, set DEBUG to *:

Bash
export DEBUG="*"
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu