# Debugging (/docs/orm/v6/prisma-client/debugging-and-troubleshooting/debugging)

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

You can enable debugging output in Prisma Client and Prisma CLI via the [`DEBUG`](/orm/v6/reference/environment-variables-reference#debug) environment variable. It accepts two namespaces to print debugging output:

* `prisma:engine`: Prints relevant debug messages happening in a Prisma ORM [engine](https://github.com/prisma/prisma-engines/)
* `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](/orm/v6/prisma-client/observability-and-logging/logging) for more information.

Setting the DEBUG environment variable [#setting-the-debug-environment-variable]

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="*"
```

## Related pages

- [`Handling exceptions and errors`](https://www.prisma.io/docs/orm/v6/prisma-client/debugging-and-troubleshooting/handling-exceptions-and-errors): This page covers how to handle exceptions and errors
- [`Troubleshooting binary size and deployment issues`](https://www.prisma.io/docs/orm/v6/prisma-client/debugging-and-troubleshooting/troubleshooting-binary-size-issues): This page covers how to resolve large bundle sizes, slow builds, and deployment errors caused by Prisma ORM Rust engine binaries