Overview
Live Debugger lets you inspect application behavior in real time, directly in running services, without redeploying code or interrupting execution.
Instead of adding temporary debug logs or reproducing issues locally, you can dynamically capture application state at specific points in the code. This includes variable values, method parameters, and execution context. Live Debugger is well suited for diagnosing issues in production or other long-running environments.
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.
Key capabilities
Live Debugger provides:
- Dynamic logpoints (non-breaking breakpoints) placed at supported code locations in your application or third-party libraries.
- Real-time inspection of variable values, method arguments, and execution context in running code.
- Safe, non-invasive data capture that collects debugging information without pausing applications or requiring redeploys.
- Auto-expiring logpoints that deactivate automatically after a configurable duration.
- Conditional data capture based on user-defined expressions, so information is collected only when specific conditions are met.
- Built-in sensitive data scrubbing to help prevent exposure of personal data, secrets, and credentials.
Live Debugger vs. Dynamic Instrumentation
Live Debugger and Dynamic Instrumentation use the same instrumentation technology. They share an expression language and some configuration settings. Both collect data from running services without requiring code changes, redeployments, or restarts.
The products differ in the data they capture and how long the instrumentation remains active:
- Use Live Debugger to investigate a problem. Its logpoints capture log events and variable snapshots, and expire when the Debug Session ends.
- Use Dynamic Instrumentation to add custom APM instrumentation. Dynamic spans, span tags, and metrics remain active until you disable them.
Requirements
- Datadog Java SDK, version 1.64.0 or higher strongly recommended (JDK 8 or higher); versions below 1.64.0 may result in unexpected errors and a degraded experience
- Minimum for in-app enablement: 1.48.0
- Minimum for manual enablement: 1.42.0
- Datadog Agent, version 7.49.0 or higher
- Datadog Python SDK (
ddtrace), version 4.11.0 or higher strongly recommended; versions below 4.11.0 may result in unexpected errors and a degraded experience- Minimum for in-app enablement: 3.10.0
- Minimum for manual enablement: 2.9.0
- Datadog Agent, version 7.49.0 or higher
- Datadog .NET SDK, version 3.46.0 or higher strongly recommended; versions below 3.46.0 may result in unexpected errors and a degraded experience
- Minimum for in-app enablement: 3.57.0
- Minimum for manual enablement: 3.9.0
- Datadog Agent, version 7.49.0 or higher
- Datadog Node.js SDK (
dd-trace-js), version 5.109.0 or higher strongly recommended; versions below 5.109.0 may result in unexpected errors and a degraded experience- Minimum for in-app enablement: 5.84.0
- Minimum for manual enablement: 5.39.0
- Source maps published with the deployed application if source code is transpiled or bundled (for example, TypeScript, Babel, or Webpack). See TypeScript import limitations.
- Node.js runtime (Bun and Deno are not supported)
- Datadog Agent, version 7.49.0 or higher
- Datadog Ruby SDK (
ddtrace), minimum version 2.37.0; version 2.38.0 or higher strongly recommended; versions below 2.38.0 may result in unexpected errors and a degraded experience - Ruby 2.6 or higher (MRI/CRuby only; JRuby is not supported)
- A Rack-based framework (Rails, Sinatra, or other Rack-compatible frameworks); background workers (such as Sidekiq or Resque) are not supported
RAILS_ENVorRACK_ENVset toproduction- Datadog Agent, version 7.49.0 or higher
- Datadog PHP SDK (
dd-trace-php), minimum version 1.5.0; version 1.23.0 or higher strongly recommended; versions below 1.23.0 may result in unexpected errors and a degraded experience - Datadog Agent, version 7.49.0 or higher
- Datadog Go SDK, version 2.9.0 or higher strongly recommended (or 1.74.6 or higher on the v1 line); versions below 2.9.0 may result in unexpected errors and a degraded experience
- Minimum for in-app enablement: 2.6.0
- Datadog Agent, version 7.73.0 or higher, running on the same host as your application
- Linux kernel 5.17 or higher
Datadog configuration
- Unified Service Tagging configured with
service,env, andversiontags on your deployment - Remote Configuration enabled in the Agent
- Agent log collection enabled with
logs_enabled: true- If log collection is disabled, set
apm_config.debugger_logs_enabled_override: true(DD_APM_DEBUGGER_LOGS_ENABLED_OVERRIDE=true) to forward Live Debugger logs.
- If log collection is disabled, set
- (Recommended) Source Code Integration
Permissions
The following permissions are required to use Live Debugger:
- 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 for captured data.
For more information about roles and how to assign roles to users, see Role Based Access Control.
Setup
To use Live Debugger, configure the Datadog Agent and then enable Live Debugger on your application.
Configure the Datadog Agent
Use one of the following methods to configure the Agent for Live Debugger:
Update system-probe.yaml (located alongside datadog.yaml) with the following:
dynamic_instrumentation:
enabled: true
For more information, see Agent configuration files.
Add the following to your Datadog Agent manifest:
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
Add the following to your Helm chart:
datadog:
dynamicInstrumentationGo:
enabled: true
Enable Live Debugger
You can enable Live Debugger in-app or with environment variables.
Enable in-app (recommended)
Enable Live Debugger in-app in one of two ways:
- On the Live Debugger Settings page, enable the service and environment.
- Start a Debug Session. Live Debugger is enabled automatically on the selected service and environment.
Enable with environment variables
Set the following environment variables if your SDK is below the in-app minimum, or if you want to manage enablement outside the Datadog UI.
Start your service with DD_DYNAMIC_INSTRUMENTATION_ENABLED=true, along with DD_SERVICE, DD_ENV, and DD_VERSION. The -javaagent argument must come before -jar:
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
Note: On JDK 18 and earlier, classes compiled with the -parameters flag (default in Spring 6+, Spring Boot 3+, and Scala) may fail to instrument with the error Method Parameters detected.
Install ddtrace, then start your service with DD_DYNAMIC_INSTRUMENTATION_ENABLED=true and ddtrace-run:
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
Start your service with the following environment variables set:
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
Start your service with the following environment variables set:
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
Note: Live Debugger initializes on the first HTTP request. Your service must receive at least one request before you can create a logpoint.
Start your service with the following environment variables set:
DD_SERVICE=<YOUR_SERVICE>
DD_ENV=<YOUR_ENV>
DD_VERSION=<YOUR_VERSION>
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
Enablement modes
After you enable Live Debugger, you can check and update the enablement status of each service and environment on the Live Debugger Settings page. Each service and environment can be in one of three modes:
- 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: Live Debugger is activated on the selected service and environment, including debug symbol uploads and faster delivery of new logpoints.
- Disabled: Logpoints cannot be created or reactivated on the given service and environment.
Create a logs index
Live Debugger generates logs that are sent to Datadog and appear alongside your application logs. A dedicated logs index helps ensure these logs aren't unintentionally filtered out, especially if you use Exclusion filters.
To create the index:
- Create a logs index and configure it to the desired retention with no sampling.
- Set the filter to match on the
source:dd_debuggertag. All Live Debugger logs have this source. - 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
Set up Source Code Integration to view source code files directly in Live Debugger. After you link the service and environment to the corresponding repository and Git commit SHA, you can add logpoints and see existing ones in the source code as you would with breakpoints in an IDE. This helps you confirm logpoints are placed accurately and avoid capturing unintended data or generating invalid results.
Note: Source Code Integration is optional when starting a Debug Session manually, but it is required when using Bits Live Debugger.
Using Live Debugger
Creating and using a Debug Session
A Debug Session lets you inspect running code using auto-expiring logpoints. To create and use a Debug Session:
- Start a Debug Session from one of the following locations:
- (Preview) On the Live Debugger page, submit a question or investigation prompt to Bits Live Debugger.
- On the Live Debugger page, click Create Debug Session or New Session.
- In the Trace Explorer, open a trace, locate the Code Origin section in the side panel, and click Start Debug Session.
- Select a code location to add the first logpoint and begin capturing log events.
- Add, remove, or modify logpoints as needed during the session.
- Log events captured by the logpoints appear in the Debug Session view as they are ingested and indexed. You can also view, query, and analyze these logs in Logs Explorer and other Datadog tools that reference log data.
- View active and inactive Debug Sessions created by users in your organization in the Live Debugger Sessions list. A Debug Session's log events are visible only during the retention period defined for the logs index.
Debug Sessions expire automatically. You can also manually disable or re-enable a session, as well as individual logpoints, at any time.
Creating logpoints
Logpoints are "non-breaking breakpoints" that specify where in the code to capture information, what data to include, and under what conditions. To add a logpoint for debugging:
- Go to the Live Debugger page.
- Click Create Debug Session.
- Choose your service, environment, and select where in your code to place the first logpoint.
- Define a logpoint message template using the expression language.
- (Optional) Use the Capture Variables option to collect all execution context or specific variables as part of the log event metadata (this feature is rate-limited to 1 execution per second). To capture only a log message string, remove the capture variables option from the logpoint definition.
- (Optional) Define a condition for when the logs should be emitted.
- Click Apply changes to save modifications to existing logpoint definitions.
Most logpoint settings can be modified after creation, even if the logpoint already started capturing log events. However, the logpoint's originally selected service, environment, and code location cannot be modified (a new logpoint or Debug Session should be created in this case).
After a logpoint is created, modified, or re-activated, it can take a couple of minutes to instrument the code and begin capturing log events. If expected logs or variable values are missing, see Troubleshooting.
Protecting sensitive data
Configure redaction for captured logs and variables using the sensitive data scrubbing guide.
Using Bits Live Debugger
Bits Live Debugger is in Preview. Learn more about Bits Live Debugger and request access.
Bits Live Debugger 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.
Note: Bits Live Debugger requires the service and environment to be in Targeted Mode. See Mode-based redaction for details.
Using Live Debugger through MCP
The Live Debugger toolset for the Datadog Model Context Protocol (MCP) server is in Preview. See the Datadog MCP Server documentation for setup and access requirements.
Use the live-debugger toolset to investigate running services with your own coding assistant.
Limitations
The following constraints apply to Live Debugger usage and configuration:
- Rate limits:
- Logpoints with variable capture: Limited to 1 execution per second.
- Logpoints without variable capture: Limited to 5000 executions per second, per service instance.
- TypeScript imports:
- When TypeScript compiles named or default imports to CommonJS, expressions using imported names can fail with
ReferenceError, even with source maps. This affects logpoint messages, conditions, and variable capture expressions. - To reference the imported value without redeploying, inspect the JavaScript from the deployed build or captured variables to find the generated module name. For example, if
import { LIMIT } from './limits'compiles toconst limits_1 = require('./limits'), replacecount > LIMITwithcount > limits_1.LIMIT. - The generated name must be in scope at the logpoint and can change between builds.
- This workaround does not apply to
instanceof, which does not support qualified class names such asfoo_1.Foo.
- When TypeScript compiles named or default imports to CommonJS, expressions using imported names can fail with
Troubleshooting
If expected logs or variable values are missing from a logpoint, check that:
- The selected service and environment are receiving traffic that executes the instrumented code.
- The source file and location match the deployed version.
- The condition matches that traffic, and the log events have no
debugger.snapshot.evaluationErrors. - The logs index retains
source:dd_debuggerevents. - The values you need are not redacted or outside the capture limits.
Further reading
Additional helpful documentation, links, and articles:
- Dynamic InstrumentationDOCUMENTATION