inspector-proxy is a utility for Node.js that enables proxying the built-in `inspector` debugger sessions. It is designed to simplify debugging scenarios, particularly when working with multiple Node.js processes (e.g., clustered applications, applications managed by `nodemon` or `cfork`) where individual debug ports might be dynamically assigned or need to be consolidated through a single entry point. The current stable version is 1.2.3. The release cadence appears to be low, with infrequent updates primarily focused on dependency maintenance. A key differentiator is its programmatic API, which allows developers to integrate the proxy directly into process management tools, automatically detecting and forwarding debugger connections from child processes to a single, stable proxy URL. It ships with TypeScript types, enhancing its usability in TypeScript projects.
npm install inspector-proxyVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically start an inspector proxy and connect it to a child process, useful for orchestrating multi-process debugging.
Implement robust argument parsing or consider libraries that abstract away inspector port discovery if more stable integration is needed. For most standard Node.js usages, the current approach is usually sufficient.
Evaluate the package's existing functionality against your requirements. For stable and mature use cases, this may not be an issue. For evolving needs, consider the long-term support implications.
No direct fix needed unless you are targeting extremely old Node.js versions. Always test your application with the specific Node.js version you intend to deploy.
Specify a different, unused port for the `InspectorProxy` constructor (e.g., `new InspectorProxy({ port: 9230 })`) or ensure no other application is listening on the desired port.Ensure you have installed the package globally using `npm install -g inspector-proxy` or `yarn global add inspector-proxy`. If it's installed locally and you want to use the CLI, prepend `npx` (e.g., `npx inspector-proxy ./test.js`).
For JavaScript, use `const InspectorProxy = require('inspector-proxy');`. For TypeScript/ESM, use `import InspectorProxy from 'inspector-proxy';` to correctly import the default export.No dependency data recorded yet.