|
2 | 2 | title: Live Debugger
|
3 | 3 | type: documentation
|
4 | 4 | further_reading:
|
5 |
| -- link: "/dynamic_instrumentation/" |
| 5 | +- link: "/tracing/live_debugger/" |
6 | 6 | tag: "Documentation"
|
7 |
| - text: "Learn more about Dynamic Instrumentation" |
| 7 | + text: "Learn more about Live Debugger" |
8 | 8 | - link: "/integrations/guide/source-code-integration/"
|
9 | 9 | tag: "Documentation"
|
10 | 10 | text: "Learn about Source Code Integration."
|
11 | 11 | ---
|
12 | 12 |
|
13 | 13 | ## Overview
|
14 |
| -The Live Debugger enables you to add temporary log statements to your runtime code to collect information for debugging. The log statements (also referred to as "log probes") are added dynamically, so there is no need to redeploy your code, allowing you to quickly resolve issues in a running system. You can edit or delete log probes at any time, and they automatically expire after 60 minutes. |
| 14 | +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 60 minutes. |
15 | 15 |
|
16 | 16 | ## Live Debugger tab
|
17 |
| -The **Live Debugger** in the Datadog tool window shows the defined log probes and the log output from these probes: |
| 17 | +The **Live Debugger** in the Datadog tool window shows the defined logpoints and their related output: |
18 | 18 |
|
19 | 19 | {{< img src="/developers/ide_plugins/idea/live_debugger/tool-window-tab.png" alt="The Live Debugger tab" style="width:100%;" >}}
|
20 | 20 |
|
21 |
| -The tree on the left shows all log probes created by the current user. Select a log probe to display the details for that probe, including log messages emitted during the past 24 hours. At the top-right of the panel, **View logs in Datadog** opens the [Log Explorer][2] in Datadog to show log events for the selected probe. |
| 21 | +The tree on the left shows all logpoints created by the current user. Select a logpoint to display its status and the log messages emitted during the past 24 hours. At the top-right of the panel, **View logs in Datadog** opens the [Log Explorer][2] in Datadog to show log events for the selected logpoint. |
22 | 22 |
|
23 |
| -To navigate to the source code location for a probe, right-click and select **Jump to Source**. |
| 23 | +To navigate to the source code location for a logpoint, right-click and select **Jump to Source**. |
24 | 24 |
|
25 | 25 | ## Source editor
|
26 |
| -In the source editor, an icon is shown in the gutter for any line that has a log probe defined: |
| 26 | +In the source editor, an icon is shown in the gutter for any line that has a logpoint defined: |
27 | 27 |
|
28 | 28 | {{< img src="/developers/ide_plugins/idea/live_debugger/gutter-icon.png" alt="Gutter icon in the source editor" style="width:100%;" >}}
|
29 | 29 |
|
30 |
| -Click the icon to open the Datadog tool window and select the log probe. Right-click the icon for options to enable, disable, edit, and delete the log probe. These actions are described in later sections. |
| 30 | +Click the icon to open the Datadog tool window and show the selected logpoint. Right-click the icon for options to enable, disable, edit, and delete the logpoint. These actions are described in later sections. |
31 | 31 |
|
32 |
| -## Managing log probes |
| 32 | +## Managing logpoints |
33 | 33 |
|
34 |
| -### Add a log probe |
35 |
| -To add a log probe, 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, and the log message you would like to have emitted at runtime: |
| 34 | +### Add a logpoint |
| 35 | +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, the log message you would like to have emitted at runtime, and an optional logpoint condition expression: |
36 | 36 |
|
37 |
| -{{< img src="/developers/ide_plugins/idea/live_debugger/new-log-probe.png" alt="Add a new log probe" style="width:75%;" >}} |
| 37 | +{{< img src="/developers/ide_plugins/idea/live_debugger/new-logpoint.png" alt="Add a new log probe" style="width:75%;" >}} |
38 | 38 |
|
39 |
| -The log message field accepts a log template that contains descriptive text and variable references—see the [Dynamic Instrumentation expression language][3] documentation for details. The log message is generated using the runtime state immediately *prior* to the line of code being executed. |
| 39 | +The log message field accepts a log template that contains descriptive text and variable references—see the [Dynamic Instrumentation expression language][3] documentation for details. The log message is generated using the runtime state immediately *prior* to the line of code being executed. If a condition is defined, log events are generated only when the condition evaluates to true. |
40 | 40 |
|
41 |
| -Log probes expire automatically after 60 minutes. |
| 41 | +Logpoints expire automatically after 60 minutes. |
42 | 42 |
|
43 | 43 | #### Local and remote versions
|
44 |
| -Notice that the remote code may be a different version compared to the source code in the IDE. The New Log Probe dialog displays the version of the code that is deployed remotely, if possible, so that you can see exactly where the log probe will be placed. This requires that your application or service is [tagged with Git information][4]. |
| 44 | +Notice that the remote code may be a different version compared to the source code in the IDE. The New Logpoint dialog displays the version of the code that is deployed remotely, if possible, so that you can see exactly where the logpoint is being placed. This requires that your application or service is [tagged with Git information][4]. |
45 | 45 |
|
46 |
| -<div class="alert alert-info"><b>Tip</b>: Checking out this revision locally shows you the same code in your IDE that is running remotely, which simplifies the live debugging experience. However, this is not required as the Datadog plugin maps local line numbers for log probes to remote line numbers based on Git commit information.</div> |
| 46 | +<div class="alert alert-info"><b>Tip</b>: Checking out this revision locally shows you the same code in your IDE that is running remotely, which simplifies the live debugging experience. However, this is not required as the Datadog plugin maps local line numbers for logpoints to remote line numbers based on Git commit information.</div> |
47 | 47 |
|
48 |
| -### Edit a log probe |
49 |
| -To modify the log message for a probe, right-click the log probe and select **Edit**: |
| 48 | +### Edit a logpoint |
| 49 | +To modify the log message for a logpoint, right-click the logpoint and select **Edit**: |
50 | 50 |
|
51 |
| -{{< img src="/developers/ide_plugins/idea/live_debugger/edit-log-probe.png" alt="Edit a log probe" style="width:75%;" >}} |
| 51 | +{{< img src="/developers/ide_plugins/idea/live_debugger/edit-logpoint.png" alt="Edit a log probe" style="width:75%;" >}} |
52 | 52 |
|
53 |
| -The service and environment cannot be changed by editing the log probe, only the log message. Changing the service or environment requires deleting the probe and creating a new one. |
| 53 | +You can update the log message and the (optional) logpoint condition. Changing the service or environment requires deleting the logpoint and creating a new one. |
54 | 54 |
|
55 |
| -**Note**: Applying changes to the log probe also extends the expiration time to 60 minutes. |
| 55 | +**Note**: Applying changes to the logpoint also extends the expiration time to 60 minutes. |
56 | 56 |
|
57 |
| -### Delete a log probe |
58 |
| -You can delete log probes by right-clicking the icon in the gutter of the source editor, or the entry in the tool window, and selecting **Delete** from the context menu. |
| 57 | +### Delete a logpoint |
| 58 | +You can delete logpoints by right-clicking the icon in the gutter of the source editor, or the entry in the tool window, and selecting **Delete** from the context menu. |
59 | 59 |
|
60 |
| -### Enable and disable a log probe |
61 |
| -You can enable or disable log probes by right-clicking and selecting the appropriate context menu item. The icon changes to indicate the current state of the log probe: |
| 60 | +### Enable and disable a logpoint |
| 61 | +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: |
62 | 62 |
|
63 | 63 | | Icon | Description |
|
64 | 64 | |--------------|-------------------|
|
65 | 65 | | {{< img src="/developers/ide_plugins/idea/live_debugger/probeActive.svg.png" alt="Active icon" width="24px" >}} | **Active**: Log events will be generated when the line of code is about to be executed.|
|
66 |
| -| {{< img src="/developers/ide_plugins/idea/live_debugger/probeDisabled.svg.png" alt="Inactive icon" width="24px" >}} | **Disabled**: The log probe is inactive, either because it automatically expired or the user disabled it manually. | |
67 |
| -| {{< img src="/developers/ide_plugins/idea/live_debugger/probeError.svg.png" alt="Error icon" width="24px" >}} | **Error**: The log probe is not generating log events due to an error. | |
68 |
| -| {{< img src="/developers/ide_plugins/idea/live_debugger/probeWarning.svg.png" alt="Warning icon" width="24px" >}} | **Warning**: The log probe may not be generating log events. | |
| 66 | +| {{< img src="/developers/ide_plugins/idea/live_debugger/probeDisabled.svg.png" alt="Inactive icon" width="24px" >}} | **Disabled**: The logpoint is inactive, either because it automatically expired or the user disabled it manually. | |
| 67 | +| {{< img src="/developers/ide_plugins/idea/live_debugger/probeError.svg.png" alt="Error icon" width="24px" >}} | **Error**: The logpoint is not generating log events due to an error. | |
| 68 | +| {{< img src="/developers/ide_plugins/idea/live_debugger/probeWarning.svg.png" alt="Warning icon" width="24px" >}} | **Warning**: The logpoint may not be generating log events. | |
69 | 69 |
|
70 |
| -Disabling then re-enabling a log probe extends the expiry time of the probe to 60 minutes. |
| 70 | +Disabling then re-enabling a logpoint extends its expiry time to 60 minutes. |
71 | 71 |
|
72 | 72 | ## Prerequisites
|
73 | 73 | The Live Debugger feature supports Java and Python and is subject to the same setup requirements as [Dynamic Instrumentation][1].
|
|
0 commit comments