Skip to content


A snapshot is a one-time "breakpoint" that doesn't block your code from running; as opposed to a traditional breakpoint, snapshots collect the stack trace and variables without interrupting the application at all.

Once you've added the snapshot, view the output directly from the IDE.


To use the plugin, make sure:

  • You've attached at least one agent to your app.
  • You install the plugin in your local IntelliJ instance).
  • You authenticate IntelliJ with your Lightrun account.
  • Make sure you have access to the server where the application with the agent is running.
  • Be sure to open the source code file for the running application from the IDE.
To add a snapshot
  1. Go to the line of your source code at which you'd like to insert the snapshot.

  2. Right-click to open the context menu:

    Context Menu -half

  3. Select Snapshot:

    The Create Snapshot dialog opens:

    Adding a Snapshot

  4. Complete the fields in the dialog as follows:

    • Agent

      bind the action to a specific agent or tag from the available options in this dropdown list

    • File

      this is the source code file into which you're inserting the action; default is to the source code file from which you're already working

    • Expression

      variables or method results to be displayed in the stack trace of the snapshot; click + to enter additional expressions

    • Condition

      an expression that limits the action; this is the condition of an if statement used to limit the execution of the action

      !!! example myVar % 7 == 0 limits the log so it only prints for variables that are divisible by 7

  5. Click Advanced to configure the following additional fields:

    • Max Hit Count

      the maximum number of times the snapshot should be taken during the lifetime of the action; default == 1.

    • Ignore quotas

      the quota (rate limit) is configured in the agent configuration file. Ignore Quotas defaults to off. Only users assigned the IGNORE-QUOTA role can perform this configuration; the checkbox is disabled for other users.

    • Expiry

      the time after which the action ceases to track code behavior and is automatically disabled; defaults to 1 hour

  6. Click OK to add the log. A marker is also added to the area above the line:

    The snapshot is added and displayed in the bottom sidebar:

    Snapshot Result

    An icon is added to the margins of the code on the line where it was added:

    Snapshot Inserted

    The Snapshot view is further detailed here

  7. Right-click Snapshot icon -icon from the gutter marker to delete or edit the configuration.

Update, edit and delete actions

Once you've added an action, you can manipulate it by:

  • viewing its details
  • editing its configuration
  • removing it
To work with exising actions

Once you create snapshot or metric, the relevant icon appears in the gutter of your code. When you enter a log, it is represented in line with your code. Icons for all of these options appear the similar to the following:

Plugin gutter -quarter

  1. Hover over the relevant icon to read summary information from its tooltip.

  2. Click the log icon or right-click any icon in the gutter to edit, delete and view details.

    Edit actions -quarter

View snapshots

Data output is sent to your IDE, the CLI, the Lightrun Management Portal, or your integrated logging tools, depending on how you've configured piping.

By default, all output is piped to the Lightrun Management Portal. To view data from the IDE, you must configure the piping accordingly.

There are three levels of log piping:

  • App - the dynamic logs appear only in the Lightrun Management Portal, as they do by default.
  • Plugin - that dynamic logs won't appear in the Management Portal. Instead they appear in the Lightrun Console of your IDE, the CLI, or your integrated logging tools.
  • Both - that dynamic logs will appear both in the Management Portal and in any integrations you're using.

To configure piping:

  1. In the Lightrun plugin, navigate to the right-hand sidebar:

    Sidebar -quarter

  2. From the relevant agent, click Sidebar -icon to open the Piping menu:

    Log Piping -ten

  3. To view dynamic logs from the IDE, set either the Plugin or the Both option.


Dynamic logs are sent from the agent to the plugin via the Lightrun management server. As this process is batched, dynamic logs may appear with a slight delay.

Snapshot data - view the stacktrace

Every time you add a snapshot to the code, it appears in the bottom sidebar of IntelliJ in the Lightrun Snapshots tab. The layout of the data that prints out is similar to the debugger interface, designed to be familiar to you.

Stacktrace in plugin -three

Find these details in the Lightrun Snapshots view:

The name that was assigned to the snapshot when it was added appears at the top of the sidebar. The left column lists all of the stack trace frames from the relevant snapshot. Click the row of a specific frame to view the variables related to the exception that was thrown.

Last update: October 27, 2021