This is fun, but I'm not sure it's actually very useful as a debugging tool. There are some <i>brilliant</i> debugging tools for JS these days. It's quite easy to connect an IDE like VSCode to a browser using the node debugger, which gives you proper breakpoints and inspections. Alternatively, in-browser tools like Chrome devtools give you much, much more than this script too.<p>If you want to interactively tinker with some JS then <a href="https://repl.it/languages/javascript" rel="nofollow">https://repl.it/languages/javascript</a> or <a href="https://jsbin.com/" rel="nofollow">https://jsbin.com/</a> are really good too.