Inspector
inspector.url()
Returns the active debugger endpoint or undefined when inactive. Treat debugger endpoint information as sensitive and avoid logging it in production. This lab uses an in-process session with no exposed debugger port. Never expose a debugger to untrusted clients. Tested on Node.js 22.16.0. Example output (one line per entry): ["true"].
Formal Syntax & Structure
nodejs syntaxnodejs
inspector.url()Return Value
string | undefined
Active endpoint or absence.
Working Example
Example Snippetnodejs
import { url } from 'node:inspector';console.log(url() === undefined);