Home

logpoints

A logpoint is a debugging feature that acts like a breakpoint, but instead of pausing execution it logs a message when the program reaches a specified location. The log message can include static text and evaluated expressions, allowing developers to observe values and state without stopping the program.

In practice, a logpoint is configured at a source line or function entry. When execution hits that

Common features include conditional logging, which emits a message only when a condition is true; log level

Support for logpoints exists in several modern tools, including Visual Studio Code, Chrome DevTools, and various

point,
the
debugger
evaluates
the
provided
expressions
and
writes
a
formatted
message
to
the
console
or
log
window,
then
continues
running.
It
often
does
not
require
modifying
source
code.
control
to
categorize
messages;
and
the
ability
to
redact
or
mask
sensitive
data.
Logpoints
are
useful
for
diagnosing
issues
in
long-running
or
complex
code
paths
where
stopping
is
disruptive.
JetBrains
IDEs,
with
exact
capabilities
varying
by
language
and
runtime.
Logpoints
differ
from
traditional
breakpoints
and
from
permanent
in-code
logging;
they
are
designed
to
be
easily
added
and
removed.
Potential
drawbacks
include
minor
performance
overhead,
the
possibility
of
noisy
logs,
and
the
risk
of
exposing
sensitive
data
if
not
properly
managed.