Skip to content

Visual Studio Lightrun plugin quick tour

Important

The Lightrun extension for Visual Studio, referred to hereafter as the "Lightrun plugin", is in public beta.

The majority of the work you do with Lightrun, such as troubleshooting, debugging, and performance testing, is performed directly from your integrated development environment (IDE) or the Lightrun CLI.

Using the Lightrun plugin, provided for a variety of popular IDEs (such as VSCode, Visual Studio, IntelliJ, and PyCharm), you can insert Lightrun actions (Logs and Snapshots) anywhere within the source code of your running applications. Also, from within the Lightrun plugin for your IDE, you can view, in real time, the output of Lightrun actions.

And, thanks to Lightrun's comprehensive range of integrations with third-party logging tools, from the plugin, you also can route output from Lightrun Logs and Metrics to your usual logging framework (such as New Relic and DataDog).

Scope of the quick tour

This quick tour article provides an overview of the main features and functionalities of the Lightrun plugin for Visual Studio. For detailed information on procedures for running Lightrun actions and managing configurations within Visual Studio, see:

Prerequisites

To follow this quick tour on your workstation:

  1. Install the Lightrun plugin.

  2. Authenticate the plugin.

  3. Attach at least one agent to your application.

  4. Open the source code for the application you want to debug in your IDE.

Lightrun plugin view

Upon clicking Lightrun, in the Visual Studio activity bar, the Lightrun sidebar opens. Follow the on-screen instructions to authenticate the plugin.

After authenticating your Lightrun plugin, your Visual Studio IDE as illustrated in the following example.

Lightrun plugin layout

Top menu bar

The top menu provides quick options to add actions, filter resources, and configure general plugin settings. For customers with agent pools enabled, you can switch between predefined agent pools configured by your system administrator.

Visual Studio top menu --half

The Lightrun plugin includes the following three tabs:

Selecting any of the three tabs exposes additional menus and options, respectively for managing Agents and Tags, Lightrun actions, and Snapshot hits.

Sources tab

The Sources view tab provides additional menus and options for assigning actions to Lightrun agents and tags, as well as selecting various custom sources directly within your Visual Studio IDE.

Sources tab --half

There are two subtabs in the Sources tab.

Agents

The Agents subtab displays a list of live agents running alongside your applications. The Agents subtab appears similar to the following image.

Agents subtab --half

Actions on an agent

  • Click the overflow menu icon Overflow menu icon on an agent to display the actions assigned to the agent.

    Agents subtab expanded --half

Add an action to an agent

  • Click the add icon add icon --icon on an agent to add an action to the agent.

    Agents add actions --half

Agent advanced options

  • Click the menu icon Agent options menu icon to display the AGENT OPTIONS menu.

    Lightrun plugin layout --half

Agent details

  • Select Pin to pin the agent to the top of the Agents subtab or select Details to view more information about the agent.

    View agent details --half

The following table summarizes the information displayed in the Agent details window.

Field Description
Name The agent's display name or host name if not specified
Host The name of the machine where the agent is running
Environment The runtime environment of the application with which the agent is running
ID A unique identifier, automatically generated for the agent
PID The process ID (on the machine where the agent is running)
Start time The time at which the agent started running
API version The version number of the server connected to the agent
Agent version The version number of the agent
Tags Next to Agent details, the names of tags that have been applied to the agent. If there are more than one tag, additional tags are displayed by clicking the Show additional tags icon.

Tags tab

The Tags subtab lists all available tags with their associated agents and actions. The Tags subtab appears similar to the following image.

Tags tab --half

Agents and actions on a tag

  • Click the Overflow menu icon Overflow menu icon on a tag to reveal the agents and actions associated with that tag.

Tags tab expanded --half

Adding an action on a tag

  • Click the add icon add icon --icon on a tag to add an action to the tag.

Tags add actions --half

Advanced tag options

  • Click the menu icon Agent options menu icon to display the TAGS OPTIONS menu.

Tags options --half

  • Select Pin to pin the tab to the top of the Tags subtab or select Delete to delete the tag.

From the sources dynamic search field, you can search for Logs, Snapshots, and Metrics attached to specific agents or tags. As you begin typing, the list of relevant agents updates dynamically.

Tip

The Sources dynamic search is particularly useful for finding specific dynamic Logs, when working with multiple agents and tags.

Dynamic search field --half

Actions tab

The Actions tab lists all Lightrun actions (Logs, Metrics, and Snapshots) currently attached to your code. This includes active actions, disabled actions, expired actions, and actions with errors.

VSCode actions tab --half

  • Click the menu icon Action options menu icon to display the ACTION OPTIONS menu.

VSCode Action options --half

  • Click Edit to edit an action.
  • Click Info to view more information about the action.
  • Click Go to to navigate the Visual Studio editor to the action file and code line.
  • Click Duplicate to create another copy of the action.
  • Click Delete to delete the action.

The Actions dynamic search filter allows you to search for Lightrun actions using their names, agent names, filename, or code line. You can also sort the action tab with the Filename and Creation time options, or filter with the All, Active, Expired, and Error statuses.

As you start typing, the search filter will update the action list dynamically.

Dynamic search field --half

Snapshot Hits tab

The Snapshot hits tab allows you to view and manage the snapshot hits captured in your system.

Snapshots tab --half

Use the dynamic search filter to filter snapshots base on their names, agent names, filename, or code line. You can also sort the snapshot hit tab with the Name, Start time, and Recently hit options, or load snapshot hits from an external file.

Vscode snapshots --half

Snapshot hit information

  • Click on a snapshot hit to view more information about the hit.

    Vscode snapshots --half

    The snapshot hit data is divided into three sections.

    Sections Description
    Snapshot hit details View more information about the snapshot.
    Snapshot hit variables View snapshot stacktrace variables.
    Snapshot hit call stack View snapshot stacktrace call stack (frames).

Share snapshots

  • Click Share to share the snapshot's data.

    Vscode snapshots share --half

  • Click on a call stack to navigate to the hit's source code and line

Lightrun Console

The Lightrun Console lets you view and interact with data from dynamic logs and metrics directly from within your Visual Studio IDE.

Note

Data from dynamic logs and metrics only appear in the Lightrun Console when you set their target configuration to Plugin.

The Lightrun Console appears similar to the following image.

Lightrun console --half

  • Enter an agent's name into the console’s search bar to display only data from logs and metrics associated with the agent alone.
  • Click Clear logs to clear the entire console, and use the My Logs only toggle to configure if you want to view actions created by you alone or actions created by other members of your team in the Lightrun Console.

Lightrun plugin settings

  • Click the More Options icon More options menu icon at the top of the plugin to open the following menu in the Lightrun plugin.

    VSCode plugin options

From the Options menu, you can do the following:

View or update plugin connectivity settings

Refresh plugin or sign out

  • Refresh the user interface.
  • Sign out from the current user.

Access Lightrun resources

  • Provide feedback
  • Open the Lightrun documentation.
  • Access the Lightrun Management Portal.

Last update: December 18, 2024