❌

Reading view

JavaScript runtime instrumentation via Chrome DevTools Protocol

I’ve been experimenting with Chrome DevTools Protocol primitives to build tools for reversing and debugging JavaScript at runtime.

The idea is to interact with execution by hooking functions without monkeypatching or modifying application code.

Conceptually, this is closer to a Frida-style instrumentation model (onEnter/onLeave handlers), but applied to the browser via CDP.

Early experiments include:

  • attaching hooks to functions at runtime
  • inspecting and modifying arguments and local variables
  • overriding return values (unfortunately limited to sync functions due to CDP constraints)
  • following return values to their consumer (best-effort / heuristic)
  • conditional stepping (stepIn / stepOut / stepOver)

All implemented via CDP (debugger breakpoints + runtime evaluation), so this also works inside closures and non-exported code.

I’d really appreciate feedback β€” especially from people doing reverse engineering, bug bounty, or complex frontend debugging.

submitted by /u/filippo_cavallarin
[link] [comments]
  •  
❌