Can You Change the Behavior of a Running Node.js Process From the Outside?
summary
Demonstrates changing a running Node.js process without code changes by sending SIGUSR1 to enable the debugger, connecting with the Chrome DevTools Protocol via chrome-remote-interface, using runtime.evaluate and queryObjects to find the http.Server instance, and callFunction to wrap its request listeners with a logger. The demo builds an injector script that monkey‑patches listeners to console.log method and url, works live, and shows cleanup and security limits requiring local machine access.
AI-written summary · about
chapters (8)
- 0:00Start
- 2:33Live Demo
- 7:37The Devtool Protocol
- 9:33Enable the Runtime Domain
- 10:09Evaluate an Arbitrary Script on the Remote Node Js Process
- 11:02Include Command Line Api
- 12:12Query Objects
- 14:59Call Function
related talks
21mFoundations of Debugging Node.js
43mFinding memory leaks and CPU bottlenecks with Node.js debug tools
33mDebugging Your Node.js Apps
31mConsole.loggers Anonymous: A Debugging Roadmap from Local to Production
50mDebugging Node.js in Production
24mDebuggin a Large Node Cluster
17mRunning Node.js in Production
50mPost-Mortem Debugging in Node.js
