Skip to content
Draft
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
105 changes: 64 additions & 41 deletions content/en/tracing/live_debugger/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Instead of adding temporary debug logs or reproducing issues locally, you can dy

Live Debugger uses logpoints: auto-expiring, non-breaking breakpoints that collect diagnostic data without pausing the application. Since execution continues normally, Live Debugger can be used safely on production systems to investigate problems as they happen.

{{< img src="tracing/live_debugger/live-debugger-demo-2025050702.mp4" alt="Live Debugger Product Demo" video="true" >}}

## Key capabilities

Live Debugger provides:
Expand All @@ -49,51 +47,53 @@ Live Debugger provides:

## Requirements and setup

Live Debugger supports Python, Java, .NET, Ruby, Node.js, PHP, and Go. It requires the [Datadog Agent][2], an
[APM-instrumented application][3], and [Remote Configuration][4]. You can enable it for an individual service either in-app, or by
setting an environment variable.
Live Debugger supports Python, Java, .NET, Ruby, Node.js, PHP, and Go. It requires the [Datadog Agent][2] (version 7.49.0 or later), an [APM-instrumented application][3], and [Remote Configuration][4].

### Minimum tracer versions

Live Debugger requires the following minimum tracer versions:

- [Java][6] ≥ 1.64.0
- [Python][5] ≥ 4.11.0
- [.NET][7] ≥ 3.46.0
- [Node.js][8] ≥ 5.109.0
- [PHP][10] ≥ 1.21.0
- [Ruby][9] ≥ 2.35.0
- [Go][22] ≥ 2.9.0

Older tracer versions might require enabling Live Debugger manually through an environment variable. To enable Live Debugger manually, go to the [manual enablement instructions][25] and select your runtime language.

The enablement method depends on your tracer version, see the table below for details.
### Enabling Live Debugger

| | By Service<br>(In-App) | By Service<br>(Env Var) |
|---|---|---|
| **How to Enable** | Settings page | Environment variables |
| **Agent Version** | v7.49.0+ | v7.49.0+ |
| **Minimum Tracer Versions** | [Python][5] ≥ 3.10.0<br>[Java][6] ≥ 1.48.0<br>[.NET][7] ≥ 3.29.0 | [Python][5] ≥ 2.2.0<br>[Java][6] ≥ 1.34.0<br>[.NET][7] ≥ 2.54.0<br>[Node.js][8] ≥ 5.39.0<br>[Ruby][9] ≥ 2.29.0<br>[PHP][10] ≥ 1.5.0<br>[Go][22] ≥ 2.2.3 (or 1.74.6) |
<div class="alert alert-info">To use Bits Live Debugger, see the <a href="/tracing/live_debugger/bits-live-debugger/">Bits Live Debugger</a> page for setup instructions.</div>

To enable Live Debugger in-app, navigate to the Live Debugger **Settings** page, select the desired service, and toggle
it to **Enabled**.
Live Debugger enablement behavior depends on your service's runtime language and tracer version:

{{< img src="tracing/live_debugger/live_debugger_enablement.mp4" video="true" alt="Enabling Live Debugger through the setting page" style="width:90%" >}}
- **Java, Python, .NET, and Node.js (recent tracer versions)**: No explicit "Enable" step is required. As long as all prerequisites are met and Live Debugger has not been explicitly disabled for the service and environment, Live Debugger is automatically enabled the first time you start a Debug Session. You can start a session through Bits Live Debugger or by manually creating a logpoint.
- **Ruby and PHP**: Live Debugger must be enabled manually at the tracer level through environment variables before a debug session can be successfully started. See [manual enablement instructions][25].
- **Go**: Live Debugger requires a configuration at the Datadog Agent level before it can be enabled on the services running on the same host. After the Agent configuration is added, any services on the same host can be enabled either in-app from the [Live Debugger Settings page][26] or manually through environment variables. See the [manual enablement instructions][25] for the Agent configuration steps.

If in-app enablement isn't available, follow the instructions below for your target language:
Disabling Live Debugger on a service and environment can always be done in-app from the [Live Debugger Settings page][26], regardless of runtime language or tracer version.

{{< card-grid >}}
{{< image-card href="/dynamic_instrumentation/enabling/java" src="integrations_logos/java.png" alt="Java" >}}
{{< image-card href="/dynamic_instrumentation/enabling/python" src="integrations_logos/python.png" alt="Python" >}}
{{< image-card href="/dynamic_instrumentation/enabling/dotnet" src="integrations_logos/dotnet-core.png" alt="Dotnet" >}}
{{< image-card href="/dynamic_instrumentation/enabling/dotnet" src="integrations_logos/dotnet-framework.png" alt="Dotnet" >}}
{{< image-card href="/dynamic_instrumentation/enabling/nodejs" src="integrations_logos/nodejs.png" alt="Node.js" >}}
{{< image-card href="/dynamic_instrumentation/enabling/ruby" src="integrations_logos/ruby.png" alt="Ruby" >}}
{{< image-card href="/dynamic_instrumentation/enabling/php" src="integrations_logos/php.png" alt="PHP" >}}
{{< image-card href="/dynamic_instrumentation/enabling/go" src="integrations_logos/go-metro.png" alt="Go" >}}
{{< /card-grid >}}
#### Enablement modes

<div class="alert alert-info">
<b>Why DI instructions?</b>
Live Debugger is built on <a href="/tracing/dynamic_instrumentation/">Dynamic Instrumentation (DI)</a>, so its
setup instructions and limitations also apply here.
</div>
Each service and environment is in one of three modes on the Live Debugger Settings page:

- **Automatic**: Live Debugger has not been set to Enabled or Disabled yet on this service and environment. This setting changes to **Enabled** automatically the first time a Debug Session is started. For a faster first-time debugging experience, switch the setting to **Enabled** in advance.
- **Enabled**: For eligible services, this setting means Live Debugger is activated on the selected service and environment, including debug symbol uploads and faster delivery of new logpoints.
- **Disabled**: This setting blocks logpoints from being created or re-activated on a given service and environment. It applies regardless of runtime language or tracer version.

#### Manual enablement

Manual configuration steps are required for Ruby, PHP, and Go, as well as for older tracer versions of Java, Python, .NET, and Node.js. You can also choose manual enablement if you prefer to manage enabling and disabling Live Debugger through environment variables. To enable Live Debugger manually, go to the [manual enablement instructions][25] and select your runtime language.

### Permissions

The following permissions are required to use Live Debugger:

- **Dynamic Instrumentation Read Configuration** (`debugger_read`) - Required to access the Live Debugger page.
- One of the following write permissions:
- **Dynamic Instrumentation Write Configuration** (`debugger_write`) - Required to create or modify debug logs in any environment.
- **Dynamic Instrumentation Write Pre-Prod** (`debugger_write_preprod`) - Required to create or modify debug logs in known pre-production environments only (such as staging or QA).
- **Dynamic Instrumentation Capture Variables** (`debugger_capture_variables`) - Required to use the **Capture method parameters and local variables** option.
- **Live Debugger Read** (`live_debugger_read`) - Required to access the Live Debugger page.
- **Live Debugger Write** (`live_debugger_write`) - Required to create or modify Debug Sessions and logpoints.
- **Live Debugger Redaction Write** (`live_debugger_redaction_write`) - Required to change the [redaction mode][24] for captured data.

For more information about roles and how to assign roles to users, see [Role Based Access Control][21].

Expand All @@ -104,16 +104,14 @@ Live Debugger generates logs that are sent to Datadog and appear alongside your
If you use [Exclusion filters][11], make sure Live Debugger logs are not filtered:

1. Create a logs index and [configure it][12] to the desired retention with **no sampling**.
2. Set the filter to match on the `source:dd_debugger` tag. All Dynamic Instrumentation logs have this source.
2. Set the filter to match on the `source:dd_debugger` tag. All Live Debugger logs have this source.
3. Make sure the new index takes precedence over any other with filters that match that tag, because the first match wins.

### Link your source code

If you enable the Datadog Source Code Integration, you can debug code directly through
Live Debugger.

{{< img src="tracing/live_debugger/live_debugger_code_viewer.png" alt="Live Debugger with Source Code Integration enabled showing code viewer" style="width:90%" >}}

## Using Live Debugger

### Creating and using a Debug Session
Expand Down Expand Up @@ -143,13 +141,35 @@ Logpoints are "non-breaking breakpoints" that specify where in the code to captu

### Protecting sensitive data

Live Debugger data might contain sensitive information, especially when using the "Capture Variables" option. To protect this data:
Live Debugger data might contain sensitive information, especially when using the "Capture Variables" option. Live Debugger applies automatic mode- and identifier-based redaction to help protect sensitive data before captured data becomes available.

1. Use the built-in [sensitive data scrubbing][1] mechanisms.
2. Use [Sensitive Data Scanner][17] to identify and redact sensitive information based on regular expressions.
#### Mode-based redaction

Live Debugger has two redaction modes:

- **Strict Mode**: Redacts all values except numbers and Booleans.
- **Targeted Mode**: Redacts known sensitive patterns such as credit card numbers, API keys, IPs, and other PII. It also runs a high-entropy secrets scanner that automatically redacts likely secrets, which appear as `[REDACTED:HIGH_ENTROPY]` in captured data.

These redaction modes cannot be disabled, only switched, and Targeted Mode is applied automatically in common pre-production environments like `staging` or `preprod`. Changing the redaction mode requires the **Live Debugger Redaction Write** permission.

#### Identifier-based redaction

Variable values associated with common sensitive identifiers (for example, `password`, `accessToken`, and similar terms) are scrubbed before captured data leaves the host. Additional language-specific redaction rules are built into each tracer.

You can extend redaction behavior through:

- Custom identifier-based redaction
- Class/type-based redaction rules
- Sensitive Data Scanner rules

See the [sensitive data scrubbing][1] instructions and [Sensitive Data Scanner][17] documentation for configuration details.

### Bits Live Debugger

{{< beta-callout url="https://www.datadoghq.com/product-preview/debug-with-bits/" >}}
Bits Live Debugger is in Preview. Request access to join the waiting list.
{{< /beta-callout >}}

[Bits Live Debugger][23] lets you investigate a running service by describing the issue in plain language. Bits Code handles logpoint placement, captures variable snapshots, and helps interpret the results.

## Impact on performance and billing
Expand Down Expand Up @@ -196,3 +216,6 @@ The following constraints apply to Live Debugger usage and configuration:
[21]: /account_management/rbac/permissions#apm
[22]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/go
[23]: /tracing/live_debugger/bits-live-debugger/
[24]: #mode-based-redaction
[25]: /tracing/live_debugger/enabling/
[26]: https://app.datadoghq.com/debugging/settings
231 changes: 231 additions & 0 deletions content/en/tracing/live_debugger/enabling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
---
title: Enabling Live Debugger
description: Enable Live Debugger for your applications through environment variables to capture logpoints and variable snapshots without code changes.
aliases:
- /tracing/live_debugger/enabling/
further_reading:
- link: '/tracing/live_debugger/'
tag: 'Documentation'
text: 'Live Debugger'
- link: '/agent/'
tag: 'Documentation'
text: 'Getting Started with Datadog Agent'
---

Live Debugger is a feature of supporting Datadog SDKs. If you are already using [APM to collect traces][1] for your application, ensure your SDK is up-to-date and then enable Live Debugger for your application.

For Java, Python, .NET, Node.js, and Go on recent tracer versions, Live Debugger can be enabled in-app from the [Live Debugger Settings page][2]. See [Live Debugger > Enablement modes][3] for details and minimum tracer versions.

The instructions below cover **manual enablement** through environment variables. Manual enablement is required for Ruby and PHP, and for older tracer versions of Java, Python, .NET, Node.js, and Go. It is also available on supported tracer versions if you prefer to manage enablement through environment variables instead of in-app, for example, to enable Live Debugger in bulk across many services.

<div class="alert alert-info">Live Debugger and <a href="/tracing/dynamic_instrumentation/">Dynamic Instrumentation</a> share the same enablement state per service and environment. The <code>DD_DYNAMIC_INSTRUMENTATION_ENABLED</code> environment variable controls enablement for both products, and enabling or disabling one also enables or disables the other for that service and environment. The two products have separate permissions and Settings pages.</div>

Select your runtime for manual enablement instructions:

{{< tabs >}}
{{% tab "Java" %}}
**Prerequisites:**

- JDK version 8 or higher.
- [Java tracer][101] version 1.64.0 or higher.

**Setup:**

Set `DD_DYNAMIC_INSTRUMENTATION_ENABLED=true` on your service and start it with the Java agent attached:

```shell
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
java \
-javaagent:dd-java-agent.jar \
-jar <YOUR_SERVICE>.jar
```

The `-javaagent` argument must come before `-jar`.

After your service restarts, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/java/
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab "Python" %}}
**Prerequisites:**

- [Python tracer (`ddtrace`)][101] version 4.11.0 or higher.

**Setup:**

Install `ddtrace`, then set `DD_DYNAMIC_INSTRUMENTATION_ENABLED=true` and run your service with `ddtrace-run`:

```shell
pip install ddtrace
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
ddtrace-run python -m myapp.py
```

After your service restarts, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/python/
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab ".NET" %}}
**Prerequisites:**

- [.NET tracer][101] version 3.46.0 or higher.

**Setup:**

Set the following environment variables on your service and restart it:

```shell
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

After your service restarts, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/dotnet-core
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab "Node.js" %}}
**Prerequisites:**

- [Node.js tracer (`dd-trace-js`)][101] version 5.109.0 or higher.
- If your source code is transpiled or bundled (for example, TypeScript), publish source maps along with the deployed application.

**Setup:**

Set the following environment variables on your service and restart it:

```shell
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

After your service restarts, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/nodejs/
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab "PHP" %}}
**Prerequisites:**

- [PHP tracer (`dd-trace-php`)][101] version 1.21.0 or higher.

**Setup:**

Set the following environment variables on your service and restart it:

```shell
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

After your service restarts, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/php
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab "Ruby" %}}
**Prerequisites:**

- [Ruby tracer (`ddtrace`)][101] version 2.35.0 or higher.
- Ruby 2.6 or higher (MRI only; JRuby is not supported).
- A Rack-based web framework (Rails, Sinatra, or other Rack-compatible frameworks). Background workers (such as Sidekiq or Resque) are not supported.
- `RAILS_ENV` or `RACK_ENV` set to `production`.

**Setup:**

Set the following environment variables on your service and restart it:

```shell
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

Live Debugger initializes when your application processes its first HTTP request. After your service receives at least one request, return to the [Live Debugger page][102] to start a Debug Session.

[101]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/ruby/
[102]: https://app.datadoghq.com/debugging/sessions
{{% /tab %}}

{{% tab "Go" %}}
**Prerequisites:**

- [Datadog Agent][101] version 7.73.0 or higher, running on the same host as your application.
- [Go tracer][102] version 2.9.0 or higher (or 1.74.6 or higher on the v1 line).
- Linux kernel 5.17 or higher.

**Setup:**

Enable Live Debugger in both the Datadog Agent and your application.

Enable Live Debugger in the Agent configuration using one of the following methods, depending on how you deploy the Agent:

**Configuration YAML file**: Update `system-probe.yaml` (located alongside `datadog.yaml`) with the following. For more information, see [Agent configuration files][104].

```yaml
dynamic_instrumentation:
enabled: true
```

**Environment variable**: Add the following to your Datadog Agent manifest:

```
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

**Helm**: Add the following to your Helm chart:

```yaml
datadog:
dynamicInstrumentationGo:
enabled: true
```

Then start your service with the following environment variables:

```shell
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

After your service restarts, return to the [Live Debugger page][103] to start a Debug Session.

[101]: /agent/
[102]: /tracing/trace_collection/automatic_instrumentation/dd_libraries/go
[103]: https://app.datadoghq.com/debugging/sessions
[104]: /agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-main-configuration-file
{{% /tab %}}
{{< /tabs >}}

To enable Bits Live Debugger, see [Bits Live Debugger][4].

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /tracing/trace_collection/
[2]: https://app.datadoghq.com/debugging/settings
[3]: /tracing/live_debugger/#enablement-modes
[4]: /tracing/live_debugger/bits-live-debugger/
Loading
Loading