Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions content/en/developers/ide_plugins/idea/live_debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,42 @@
---

## Overview
The Live Debugger enables you to add logpoints—auto-expiring, non-breaking breakpoints—to your runtime code to collect information for debugging. The logpoints are added dynamically, so there is no need to redeploy your code, allowing you to resolve issues in a running system. You can edit or delete logpoints at any time, and they automatically expire after 48 hours.
The Live Debugger enables you to add logpoints—auto-expiring, non-breaking breakpoints—to your runtime code to collect information for debugging. The logpoints are set dynamically in running systems, so there is no need to redeploy your code to investigate and resolve issues. Logpoints are grouped into sessions and you can activate, edit, deactivate or delete sessions (or individual logpoints) at any time. All sessions and logpoints automatically deactivate within 48 hours.

Check notice on line 14 in content/en/developers/ide_plugins/idea/live_debugger.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.oxfordcomma

Suggestion: Use the Oxford comma in 'Logpoints are grouped into sessions and you can activate, edit, deactivate or'.

## Live Debugger tab
The **Live Debugger** in the Datadog tool window shows the defined logpoints and their related output:
The **Live Debugger** tab in the Datadog tool window shows the current session, its logpoints and the data captured by the selected logpoint:

{{< img src="/developers/ide_plugins/idea/live_debugger/tool-window-tab.png" alt="The Live Debugger tab" style="width:100%;" >}}

The panel has three sections:

* [All available logpoints](#logpoints-tree)
* [Status and events](#logpoint-status-and-events) for the selected logpoint
* [Runtime data](#logpoint-event-data) for the selected logpoint event
* The [current session](#current-session) and its logpoints (on the left side)
* The [status and events](#logpoint-status-and-events) for the selected logpoint (in the center)
* The [runtime data](#runtime-data-for-debugging) for the selected logpoint event (on the right side)

### Logpoints tree
The logpoints tree on the left section shows the available logpoints, with these filters:
### Current session
The session view shows the current session and its logpoints. Select another session, or start a new one, using the selector.

* `Only my logpoints` - Show only logpoints created by the current user
* `Only the current repositories` - Show only logpoints for the repositories associated with the current project
* `Only enabled logpoints` - Show only logpoints that are enabled
{{< img src="/developers/ide_plugins/idea/live_debugger/session-selector.png" alt="The session selector" style="width:100%;" >}}

Activate, deactivate or delete the session, using the controls in the toolbar at the right of the selector. You can also open the session in the Datadog web application from here.

Check notice on line 32 in content/en/developers/ide_plugins/idea/live_debugger.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.oxfordcomma

Suggestion: Use the Oxford comma in 'Activate, deactivate or'.

Select any logpoint to display its status and recently generated events, or to [enable, disable](#enable-and-disable-a-logpoint), [edit](#edit-a-logpoint) or [delete](#delete-a-logpoint) it. To navigate to the source code location for a logpoint, double-click it or right-click and select **Jump to Source**.

### Logpoint status and events
The central section displays the status and recent event information for the selected logpoint. Select an event to view the generated log message, the captured variables, and the runtime stacktrace for the event. The list shows up to 50 events from within the past 24 hours.
The central section displays the status and recent event information for the selected logpoint. The list shows up to 50 events from within the past 24 hours. Select an event to view the generated log message, the captured variables, and the runtime stacktrace for the event.

At the top-right of the panel, **View logs in Datadog** opens the [Log Explorer][2] in Datadog to explore all log events for the selected logpoint.

### Logpoint event data
The right section displays data for the selected logpoint event, including captured variables and the stacktrace for the event. This runtime context is invaluable for understanding issues and reasoning about the source code.
### Runtime data for debugging
The right section displays data for the selected logpoint event, including captured variables and the stacktrace for the event. This runtime context is invaluable for understanding issues and reasoning about your source code.

The **Captures** tab shows a tree view of variable values captured at runtime for the logpoint. Nested values are captured up to the depth limit defined in the logpoint. The data is fully searchable and you can copy selected items to the clipboard.

The **Stacktrace** tab shows the runtime path execution leading up to the logpoint. Double-click any frame in the stack trace to open the corresponding source file location.

## Source editor
In the source editor, an icon is shown in the gutter for any line that has a logpoint defined:
In the source editor, an icon is shown in the gutter for any line that has a logpoint defined in the current session:

{{< img src="/developers/ide_plugins/idea/live_debugger/gutter-icon.png" alt="Gutter icon in the source editor" style="width:100%;" >}}

Expand All @@ -55,7 +55,9 @@
## Managing logpoints

### Add a logpoint
To add a logpoint, right-click on a line of code in the source editor and select **Add a Log to a Live Service**. A dialog appears where you can enter the service name, the environment, a template for the log message to be emitted at runtime, the variable capture depth, and a logpoint condition expression (optional):
To add a logpoint right-click on a line of code in the source editor and select **Add Line Logpoint** (or **Add Method Logpoint**) from the **Datadog Live Debugger** menu. New logpoints are added to the current session or, if required, a new session is created.

Check notice on line 58 in content/en/developers/ide_plugins/idea/live_debugger.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

A dialog appears where you can enter the service name, the environment, a template for the log message to be emitted at runtime, a logpoint condition expression (optional), and the variable capture depth:

Check notice on line 60 in content/en/developers/ide_plugins/idea/live_debugger.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

{{< img src="/developers/ide_plugins/idea/live_debugger/new-logpoint.png" alt="Add a new log probe" style="width:75%;" >}}

Expand Down Expand Up @@ -86,6 +88,8 @@

Deleting a logpoint does not delete the events already generated by the logpoint.

When a session is deleted, all the logpoints in the session are deleted. This cannot be undone.

### Enable and disable a logpoint
You can enable or disable logpoints by right-clicking and selecting the appropriate context menu item. The icon changes to indicate the current state of the logpoint:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading