This product is not supported for your selected
Datadog site. (
).
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
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 inputs, 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:
- 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.
- Dynamic logpoint placement anywhere in your codebase, including in third-party libraries.
- 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.
Requirements and setup
Live Debugger supports Python, Java, .NET, Ruby, Node.js, and PHP. It requires the Datadog Agent, an
APM-instrumented application, and Remote Configuration. You can enable it for an individual service either in-app, or by
setting an environment variable.
The enablement method depends on your tracer version, see the table below for details.
| By Service (In-App) | By Service (Env Var) |
|---|
| How to Enable | Settings page | Environment variables |
| Agent Version | v7.49.0+ | v7.49.0+ |
| Minimum Tracer Versions | Python ≥ 3.10.0 Java ≥ 1.48.0 .NET ≥ 3.29.0 | Python ≥ 2.2.0 Java ≥ 1.34.0 .NET ≥ 2.54.0 Node.js ≥ 5.39.0 Ruby ≥ 2.9.0 PHP ≥ 1.5.0 |
To enable Live Debugger in-app, navigate to the Live Debugger Settings page, select the desired service, and toggle
it to Enabled.
If in-app enablement isn’t available, follow the instructions below for your target 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.
For more information about roles and how to assign roles to users, see Role Based Access Control.
Create a logs index
Live Debugger generates logs that are sent to Datadog and appear alongside your application logs.
If you use Exclusion filters, make sure Live Debugger logs are not filtered:
- Create a logs index and configure it to the desired retention with no sampling.
- Set the filter to match on the
source:dd_debugger tag. All Dynamic Instrumentation 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
If you enable the Datadog Source Code Integration, you can debug code directly through
Live Debugger.
Using Live Debugger
Rather debug in your IDE?
Try using Live Debugger directly from JetBrains!
Click here to learn more.
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:
- Add a logpoint to begin collecting diagnostic data.
- Add, remove, or modify logpoints as needed during the session.
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) Enable “Capture Variables” to collect all execution context (this feature is rate-limited to 1 execution per second).
- (Optional) Define a condition for when the logs should be emitted.
Note: Some feature limitations may apply depending on the service’s runtime language. Review the runtime language-specific documentation for more details.
Protecting sensitive data
Live Debugger data might contain sensitive information, especially when using the “Capture Variables” option. To protect this data:
- Use the built-in sensitive data scrubbing mechanisms.
- Use Sensitive Data Scanner to identify and redact sensitive information based on regular expressions.
Enabling Live Debugger on a service does not trigger data capture or impact performance. Data capture only occurs when there are active Debug Sessions on that service.
Performance impact: Datadog’s agent-driven instrumentation ensures minimal impact on application performance; sampling logic, rate limits, and built-in budgets prevent runaway data capture.
Pricing impact: Logs captured by Datadog are all billed the same way. This applies whether they are generated from Live Debugger or logger lines in your source code. With Live Debugger, the logpoints automatically expire after the set time period, limiting unnecessary data accumulation and costs. Monitor your Datadog Plan & Usage page for any unexpected increases after utilizing a new feature.
Limitations
The following constraints apply to Live Debugger usage and configuration:
- Configuration scope: Live Debugger and Dynamic Instrumentation are enabled or disabled together for the same service and environment.
- 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.
Further Reading