Skip to main content
A snapshot probe instruments a specific line of your source code and, the next time that line executes in production, captures a complete picture of the application’s state at that moment: all local variables in scope, the results of any watch expressions you specify, and the full call stack. No breakpoints, no pauses, no redeployment — the application keeps running while HyperProbe collects the data asynchronously and sends it to the VS Code extension.

How snapshots work

When you create a snapshot probe on a line, HyperProbe injects lightweight instrumentation into the running process. The next time execution reaches that line, the agent captures variable state and call stack frames, then immediately continues execution. The captured data appears in the HyperProbe panel in VS Code within seconds.

Creating a snapshot probe

1

Open the HyperProbe panel in VS Code

Click the HyperProbe icon in the activity bar, then select Insert a Snapshot from the probe type list.
2

Select your source

Choose the target service, environment, and commit from the Source dropdown. This tells HyperProbe which running instance to instrument.
3

Set the file path and line number

Enter the relative path to the file (for example, apps/api/src/orders.ts) and the line number where you want the snapshot to fire.
4

Add watch expressions

Enter one or more expressions to evaluate when the probe fires. HyperProbe evaluates these in the context of the instrumented line, so you can reference any variable or method in scope.
user.name
order.items.length
calculateTotal(order)
request.body.payload
Watch expressions appear in their own panel in the results view, separate from the automatically captured local variables.
5

Set a condition (optional)

Enter a boolean expression to filter when the probe fires. The probe only captures a snapshot when the condition evaluates to true.
user.role === 'admin'
request.method === 'POST'
order.total > 1000
retryCount >= 3
6

Set the hit limit and lifetime

Choose how many times the probe should capture before it auto-expires, and how long it should remain active. Then click Create.

Configuration reference

body.uiFilePath
string
required
Relative path to the source file, as it appears in your editor. For example, apps/api/src/orders.ts.
body.uiLineNumber
number
required
Line number where the snapshot probe fires. Must be a positive integer.
body.watchExpressions
string[]
Expressions to evaluate and capture when the probe fires. Each expression is evaluated in the scope of the instrumented line. Defaults to an empty array; local variables are always captured regardless of this field.
body.hitLimit
number
default:"1"
Maximum number of times the probe captures before it auto-expires. Accepts 1–20. Defaults to 1.
body.condition
string
A boolean expression that must evaluate to true for the probe to fire. Leave blank to capture on every execution.
body.lifetime
string
default:"An Hour"
How long the probe remains active. Accepts An Hour or A Day.

Viewing snapshot results

Open the HyperProbe panel and click any completed or active snapshot probe to open the inspector. The inspector shows:
  • Hit navigation — Use the arrow controls to page through captures. The counter shows Hit N / Total, ordered from oldest to newest.
  • Watch Expressions panel — The evaluated result of each expression you specified at creation time, displayed as an expandable tree.
  • Variables panel — All local variables captured at the instrumented line, scoped to the currently selected call frame. Use the search box to filter by name.
  • Call Stack panel — Every stack frame at the moment of capture. Click any frame to switch the Variables panel to show that frame’s local scope.
Click Show more in the inspector header to see the probe’s ID, hit limit, condition, and current status.

Understanding the hit limit

The hit limit is the most important safety setting for snapshot probes. Every capture creates a record in the database and transmits data from your production process to the HyperProbe backend. The default of 1 is intentionally conservative: the probe captures once, then expires automatically. Increase the hit limit when you are investigating intermittent bugs that don’t reproduce on every request — for example, a race condition or an error that affects only a subset of users. Use the condition field together with a higher hit limit to capture precisely the cases you care about without creating noise from unrelated executions.
Setting a high hit limit on a frequently executed line without a narrowing condition can generate a large volume of capture data. Start with the default of 1 or a small number, and increase only as needed.

Watch expressions vs. variables

Every snapshot automatically captures all local variables in scope at the instrumented line — you do not need to specify them explicitly. Watch expressions are for anything that is not a plain local variable:
  • Nested property access: user.profile.address.city
  • Array or object computed values: cart.items.filter(i => !i.fulfilled).length
  • Method call results: formatCurrency(order.total)
  • Globals or module-level values accessible at that scope
If you are unsure which variables are in scope, create the probe with no watch expressions first. Once you see what is captured in the Variables panel, add watch expressions for anything that requires deeper evaluation.