Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

debug-sandbox

ThaUnknown7MIT1.1.0

Spawns a Node.js sandbox process with an attached debugger to inspect via Chromium.

inspect, devtools, debug, sandbox, attach, chrome, chrome devtools, chrome attach, node devtools, node debug, node inspect, remote, remote debug, devtools://, open-node-frontend

readme

Debug Sandbox

Install:

npm i debug-sandbox -g

Spawns a Node.js sandbox process with an attached debugger to inspect via Chromium.

Useful for quickly checking how some code runs in a Chromium console, with source definions etc.

Runs as an ESM module in strict mode, with require defined globally, additionally includes a global npm function for importing modules you might not have installed localy via esm.sh, ex:

const tinyRest = await npm('tiny-rest')

Note that this is widely insecure, and could potentially be used to attack the target device, as this package additionally enables the importing of native node modules. Read more in the official Node.js documentation. These modules are sourcemapped with functional breakpoints.

You can also import non-JS files this way via:

const packageInfo = await npm('tiny-rest/package.json', { with: { type: 'json' }})

Usage:

$ sbx

Recommended Chromium extensions which auto-launches an inspect window when a Node.js inspect process is detected is NiM.