All posts


Posted On Where it begins

Was building a JS playground to help visualize how variables change during execution. It requires user to manually write log using debug() method.

Would be great if the app can automatically detect changes or print out everything needed to see at each step, just like a debugger.

To achieve this, I need to write a debugger that run inside the browser. This is doable but the amount of works is just absurb. It include a complete rewrite (or reinvent) of a JavaScript engine, which doesn’t seems so productive at all. I need to find another approach to do it.

Then I discovered the Chrome Debugging Protocol, which is exactly what I needed. It’s the communication protocol to let you communicate with a running Node.JS Debugger or Chrome Debugger process, control the debug flow such as step in, step out, execute code on the current call frame,…