Skip to main content

Logpoints

Logpoints are a way to inspect what your code is doing without changing it. Drop a marker on a line and RunJS prints the value of that line in the output pane — no console.log to add, and nothing to clean up afterwards.

Unlike top-level expression results from Auto Log, logpoints work in places where output is normally invisible: inside function bodies, loop iterations, callback arguments, and const / let declarations.

Adding and removing

You can toggle a logpoint in two ways:

  • Click the gutter next to a line to add a logpoint. Click the same spot again to remove it. A dot appears in the gutter when a logpoint is active.
  • Press F9 with the caret on a line to toggle a logpoint. This is the fastest option when your hands are already on the keyboard.

To clear every logpoint in the current tab, press Cmd+Shift+F9 on macOS, or Ctrl+Shift+F9 on Windows and Linux.

Logpoints are tab-local and don't persist between sessions — closing the tab or restarting RunJS clears them. This is intentional: they're a debugging aid, not part of your code.

Where logpoints are useful

Peeking inside loops and callbacks. Drop a logpoint on a line inside a .map, .filter, or for loop to see every value as it flows through. You'll get one output entry per iteration, in execution order.

Logpoint example 2

Inspecting intermediate values. When a chain of method calls or a long expression isn't producing what you expected, a logpoint on any step shows what that step evaluated to.

Watching variable declarations. Logpoints work on const and let declarations inside functions, so you can see the assigned value without restructuring the code into something Auto Log can pick up.

Iterating without side effects. Because logpoints live outside your source, you can add and remove them freely while debugging — they'll never end up committed to a file by accident.

Logpoint example