deno
98478472 - feat(ext/node): expose inspector.isEnabled() via process.binding('inspector') (#34203)

Commit
129 days ago
feat(ext/node): expose inspector.isEnabled() via process.binding('inspector') (#34203) Node's internal inspector binding exposes isEnabled() so user code can ask whether the debugger is currently attached. Deno's process.binding ('inspector') was an empty object, so any code reaching for that helper hit \"inspector.isEnabled is not a function\" — most visibly the test-inspector-enabled.js node_compat test, which uses it to verify that --inspect=0 enables the inspector and that process._debugEnd() later flips the state back off. This adds a minimal inspector binding that delegates to the existing op_inspector_enabled op (the same op backing process._debugEnd's gate), enables the test in config.jsonc, and leaves room to grow the binding with the rest of Node's surface later.
Author
Parents
Loading