---
title: Debug with Bits
description: >-
  Use Bits Code to create and manage Live Debugger sessions through a
  conversational interface.
breadcrumbs: Docs > APM > Live Debugger > Debug with Bits
---

# Debug with Bits

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

{% callout %}
##### Join the Preview!

Debug with Bits is in Preview. Request access to join the waiting list.

[Request Access](https://www.datadoghq.com/product-preview/debug-with-bits/)
{% /callout %}

## Overview{% #overview %}

Debug with Bits brings a conversational interface to Live Debugger for investigating running services through natural language. Describe what you want to investigate, and Bits places logpoints, retrieves variable snapshots, and interprets results. After Bits identifies a root cause, it can suggest code fixes.

All debugging activity runs through [Live Debugger](https://docs.datadoghq.com/tracing/live_debugger.md), so the same [permissions](https://docs.datadoghq.com/tracing/live_debugger.md#permissions), rate limits, auto-expiry behavior, and [sensitive data scrubbing](https://docs.datadoghq.com/dynamic_instrumentation/sensitive-data-scrubbing.md) apply.

{% alert level="info" %}
Debug with Bits uses [Bits Code](https://docs.datadoghq.com/bits_ai/bits_ai_dev_agent.md), which may impact billing.
{% /alert %}

## Prerequisites{% #prerequisites %}

Before using Debug with Bits:

- [Live Debugger](https://docs.datadoghq.com/tracing/live_debugger.md) must be enabled for the target service. See [Requirements and setup](https://docs.datadoghq.com/tracing/live_debugger.md#requirements-and-setup) for details.
- Your account must have the [permissions](https://docs.datadoghq.com/tracing/live_debugger.md#permissions) required to use Live Debugger, including read, write, and variable-capture permissions for the target environment.
- [Bits Code](https://docs.datadoghq.com/bits_ai/bits_ai_dev_agent.md) must be available in your organization.
- [Source Code Integration](https://docs.datadoghq.com/source_code/source-code-management.md) must be set up for the target service.

## Available actions{% #available-actions %}

Bits can perform the following Live Debugger actions during a debugging session:

| Action                 | Description                                                                   |
| ---------------------- | ----------------------------------------------------------------------------- |
| Discover services      | Find and validate services available for debugging in a given environment.    |
| Create logpoints       | Add logpoints to a running service at a specific code location.               |
| List session logpoints | Show the logpoints active in a Debug Session.                                 |
| Disable logpoints      | Disable all logpoints in a Debug Session.                                     |
| Retrieve snapshot data | Fetch captured variable values and execution context from an active logpoint. |

Logpoints created by Bits follow the same rules as manually created logpoints. They are read-only, non-blocking, and expire automatically after the configured time limit (10 minutes to 2 days; default: 60 minutes). Bits cannot modify application state or alter control flow.

## Start a debugging session{% #start-a-debugging-session %}

1. Go to [Live Debugger](https://app.datadoghq.com/debugging/sessions) in Datadog.

1. In the Debug with Bits chatbox, describe the issue you want to investigate. Select the target service and environment before submitting the prompt.

Bits then works through the investigation automatically:

   - It analyzes relevant code paths in the connected source code repository and may ask follow-up questions to form a hypothesis.
   - It configures and activates up to 5 logpoints at relevant code locations to capture the specific data it needs.
   - It retrieves and analyzes the logs and variable snapshots from the active logpoints to validate its hypothesis and formulate its response.

1. Review the response from Bits and, optionally, explore the details of the logpoints, captured data, and any code fixes suggested. Reply in the chat to continue the investigation as needed.

1. To disable logpoints at any time, ask Bits or click the **Disable** button on an individual logpoint or the session.

**Note**: Bits typically disables the logpoints it creates as soon as it retrieves the data it needs. Logpoints also expire automatically after the configured time limit.

## Behavior and limitations{% #behavior-and-limitations %}

**Multi-version environments**: When multiple code versions are deployed in the target environment, the target file may differ between versions. In that case, Bits asks you to confirm the target version before placing a logpoint. This prevents logpoints from landing at incorrect line numbers.

**Language support**: Some features vary by language. For example, condition expressions are not supported for all runtimes. Bits notifies you when a requested feature is not available for the target service's language.

**Sensitive data**: The [sensitive data scrubbing](https://docs.datadoghq.com/dynamic_instrumentation/sensitive-data-scrubbing.md) behavior that applies to manually created logpoints also applies to logpoints created by Bits. In production environments, non-numeric and non-Boolean captured values are redacted by default.

## Further reading{% #further-reading %}

- [Bits Code](https://docs.datadoghq.com/bits_ai/bits_ai_dev_agent.md)
- [Live Debugger](https://docs.datadoghq.com/tracing/live_debugger.md)
- [Sensitive Data Scrubbing](https://docs.datadoghq.com/dynamic_instrumentation/sensitive-data-scrubbing.md)
