This release introduces a unified instrumentation model under addHook(), along with breaking changes to clarify context semantics and remove long-standing ambiguities.
✨ New
at — Precise location-based instrumentation
You can now define precise hooks at specific locations directly within addHook() using the new at handler.
WB.Node.Instrumentation.addHook(location, {
at: [
{
location: "21:2", // line:col
onHit(ctx) {
ctx.log("hit exact location")
}
}
]
});
This enables instruction-level instrumentation without switching APIs.
Precise hooks were previously only available via addLiveHooks.
With at, everything is now unified under addHook().
🔥 Breaking Changes
ctx.variables no longer exposes runtime values
ctx.variables is now strictly a list of variables that can be modified via ctx.setVariable().
Before
ctx.variables.v1
After
v1 = 21 // access directly in the instrumented context
ctx.setVariable("v1", 123) // use setVariable in case v1 is a const
ctx.variables // ["v1", "x", ...]