
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@prisma/debug
Advanced tools
The @prisma/debug package is designed to help developers debug applications that use Prisma by providing detailed logging capabilities. It allows developers to enable or disable logging for different parts of the Prisma framework, making it easier to trace and diagnose issues related to database queries and the ORM layer.
Enable Debugging
This code snippet enables debugging for the Prisma client, which logs all the queries and internal operations performed by the Prisma client. This is useful for understanding the queries generated by Prisma and their performance implications.
process.env.DEBUG = 'prisma-client';
Selective Debugging
This snippet enables debugging selectively for both the Prisma client and the underlying Prisma engine. It helps in tracing issues that might be occurring not just at the ORM level but also at the database engine level that Prisma interacts with.
process.env.DEBUG = 'prisma-client,prisma-engine';
The 'debug' package is a widely used debugging utility that supports Node.js and browser environments. It allows developers to turn on and off debugging logs via environment variables, similar to @prisma/debug. However, it is more generic and not tailored specifically to Prisma or database debugging.
Morgan is a middleware for logging HTTP requests in Node.js applications, which is useful for debugging applications at the network level. While it serves a different purpose compared to @prisma/debug, it provides a similar level of insight into a specific aspect of application behavior (in this case, HTTP traffic).
A cached debug
.
import Debug, { getLogs } from '@prisma/debug'
const debug = Debug('my-namespace')
try {
debug('hello')
debug(process.env)
throw new Error('oops')
} catch (e) {
console.error(e)
console.error(`We just crashed. But no worries, here are the debug logs:`)
// get 10 last lines of debug logs
console.error(getLogs(10))
}
FAQs
This package is intended for Prisma's internal use
The npm package @prisma/debug receives a total of 3,051,063 weekly downloads. As such, @prisma/debug popularity was classified as popular.
We found that @prisma/debug demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.