• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

The debugger

Read time: 3 minutes
Last edited: Jun 15, 2022

Overview

This topic explains how to use the debugger.

The debugger gives you real-time insight into the events your application is sending to LaunchDarkly, so you can ensure that you've set LaunchDarkly up correctly. Different types of events appear, in detail or in summary, depending on what you want to view.

Using the debugger

The debugger shows you a real-time stream of events arriving in LaunchDarkly from your app. When you first open the debugger, it connects to the event stream to show events as they appear. Establishing the connection can take up to 30 seconds, but the debugger connection state updates to show you the connection process status. In high-volume environments, it may display sampled events, rather than 100% of events.

The debugger must be visible to work

The debugger does not display events when it is not the active tab in your browser. Leave it open and visible to view events as they occur. If you need to click around in your app to generate events, open the app in a second window. The debugger will time out after 15 minutes of inactivity. You can prompt to keep loading events.

Flag events

The debugger displays evaluation counts and variation breakdowns for each flag evaluated since you opened the debugger. Click on a flag or select it from the menu to access individual event information. The connection state for the "Flag events" tab indicates if events have occurred in your environment recently.

Debugger connected to live event stream with recent events.
Debugger connected to live event stream with recent events.

If your environment has not registered any events, the status updates to indicate that. If you receive this status frequently, it may mean that you have configured your SDK incorrectly. To learn more, read SDKs.

Flag events connected to live event stream, but with no recent evaluations.
Flag events connected to live event stream, but with no recent evaluations.

If there is an issue connecting to the event stream, an error status appears. This may appear because of an internal error or network disruptions. The error state should self-resolve, but if it does not, refresh your browser.

Here is an image of an event stream error message:

Error connecting to the event steam.
Error connecting to the event steam.

Here is an image of the Flag events tab of the debugger:

The debugger, showing flag events
The debugger, showing flag events

Flag evaluation events display as a summary. This saves data load. To get detailed evaluation event information for a flag, select it and click Debug.

This temporarily enables detailed events for that flag. The events appear as they are received. View additional information, including the user attributes used for evaluation, by clicking on an individual event.

Older SDK versions send detailed events for every evaluation

The minimum required version for each platform SDK to use summary events is:

  • .NET: 5.0.0
  • Go: 4.0.0
  • Java: 4.0.0
  • Node: 5.0.0
  • Python: 6.0.0
  • Ruby: 4.0.0
  • Rust: 1.0.0-beta.1
  • JavaScript: 2.0.0
  • Android: 2.4.0
  • iOS: 2.13.0
  • PHP: The PHP SDK does not itself support summary events. However, when PHP is used with LD Relay, the LD Relay event forwarding mode has the ability to turn the events received from the PHP SDK into summary events. This requires that you are using PHP SDK version 3.1.0 or higher. If you are using LD Relay with PHP you will need to upgrade LD Relay to version 4.0.0 or higher. Other SDKs do not require an LD Relay update to use summary events.

Filtering detailed events

You can view specific kinds of detailed events on the Flag events tab by filtering by user attributes, flag variations, or both.

To filter detailed events:

  1. Select a flag from the Find events by flag name or key menu.
  2. Click Filter.
  3. Choose a standard or custom attribute to filter by from the Add filter menu:
The "Filter" menu with a standard attribute chosen.
The "Filter" menu with a standard attribute chosen.
  1. Choose an attribute value from the Select attribute value menu.
  2. Click Add.

Only events with matching attribute values now display on the Debugger dashboard.

To add additional attribute values to your filter, click on the attribute name and select the additional values from the menu. The dashboard displays only events that match all of the attribute values you selected:

The attribute menu with multiple values selected.
The attribute menu with multiple values selected.

To remove a filter, click on the attribute name you want to stop filtering by and choose "Clear filter."

To filter variations:

  1. Select a flag from the Find events by flag name or key menu.
  2. Click Variation.
  3. Select a variation:
The "Variation" menu with options displayed.
The "Variation" menu with options displayed.

Only detailed events corresponding to the selected variation now show on the dashboard. You can also filter by multiple variations.

User events

There are two types of user events that display in the debugger:

  • Identify events are explicitly triggered by your application code
  • Index events are automatically triggered by the LaunchDarkly SDK based on flag evaluations

Click on a user to view individual event information.

Here is an image of the User events tab in the debugger:

The User events tab.
The User events tab.

Experimentation events

The Experimentation events tab only displays for customers who have Experimentation enabled. To learn more, read About Experimentation.

Here is an image of the Experimentation events tab in the debugger:

The Experimentation events tab.
The Experimentation events tab.

There are three types of experiment events:

  • Click events
  • Page view events
  • Custom events

These events correspond to the kind of metric that triggered the event.