Datadog Extension for VS Code & Cursor

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

The Datadog extension for Visual Studio Code is not supported for your selected Datadog site ().

Overview

The Datadog extension for VS Code and Cursor brings Datadog to your code editor to accelerate your development.

Datadog extension for VS Code and Cursor

The extension includes these features:

  • Model Context Protocol (MCP) Server: Connect the editor’s AI agent to production telemetry, tools, and context from Datadog.

  • Logs: Gauge log volumes and search logs from your code.

  • Code Insights: Stay informed about runtime errors, vulnerabilities, and flaky tests without leaving the code.

  • View in IDE: Jump directly from code references in Datadog to your source files.

  • Code Security: Detect and fix security issues before you commit, and write custom rules.

  • Exception Replay: Debug your production code.

  • Fix in Chat: Fix code errors, vulnerabilities, and flaky tests with AI-powered suggestions and explanations.

Unless stated otherwise, all extension features are available for both VS Code and any other IDEs based on VS Code forks, such as Cursor.

Requirements

  • Datadog account: Most features require a Datadog account.

    • New to Datadog? Learn more about Datadog’s monitoring and security tools and sign up for a free trial.
    • If your organization uses a custom sub-domain such as myorg.datadoghq.com, you must indicate it using the datadog.connection.oauth.setup.domain setting in the IDE.
  • Git: The extension works better when Git is enabled in the IDE. Ensure this is enabled by checking the git.enabled setting.

Installation

Installation steps may vary for other VS Code-based editors.

Install the extension either directly in the IDE, or from the web:

  • In VS Code: Open the Extensions view (Shift + Cmd/Ctrl + X), search for datadog, and select the official extension from Datadog.

  • From the web: Install from the extension’s page on Visual Studio Marketplace.

MCP Server setup

The extension includes access to the Datadog Model Context Protocol (MCP) Server. Ensure the MCP Server is enabled to enhance the editor’s AI capabilities with your specific Datadog environment:

  1. Open the chat panel, select agent mode, and click the Configure Tools button.

    Configure Tools button in VS Code
  2. Find the Datadog server and tools in the list and check the boxes to enable them (expand or refresh if necessary).

Install the extension either directly in the IDE, or from the web:

  • In Cursor: Open the Extensions view (Shift + Cmd/Ctrl + X), search for datadog, and select the official extension from Datadog.

  • From the web: Download the VSIX file from Open VSX Registry, and install with Extensions: Install from VSIX in the command palette (Shift + Cmd/Ctrl + P).

Datadog MCP Server setup

Install the Datadog Plugin to enable the Datadog MCP Server. You can install the plugin from the Cursor Marketplace or in Cursor Settings > Plugins.

Core features

Logs

Use Logs to gauge the volume of logs generated by a given log line in your code. The extension adds annotations above your code to detected logging patterns that match log records in Datadog.

Find out more in the Logs sub-section.

Code insights

Code insights keep you informed with Datadog-generated insights relevant to your code base, including runtime errors, code vulnerabilities, and flaky tests.

The Code Insights view.

Find out more in the Code Insights sub-section.

Code Security

The Code Security features analyze your code locally against predefined rules to detect and fix security issues and vulnerabilities before you commit changes.

Find out more in the Code Security sub-section.

Exception Replay

Exception Replay allows you to inspect the stack trace frames of any Error Tracking code insight and get information about the values of the variables of the code running in production.

Find out more in the Exception Replay sub-section.

Other features

View in IDE

This feature is only available for VS Code and Cursor. Other forks of VS Code are not supported.

The View in VS Code or View in Cursor feature provides a link from Datadog directly to your source files. Look for the button next to frames in stack traces displayed in the UI (for example, in Error Tracking):

A stack trace in Datadog showing the View in VS Code button

You can also use this feature to open your source files from an insight (such as an error from Error Tracking):

An Error Tracking issue in Datadog showing the View in VS Code button
To use this feature, first configure source code integration for your service.

Fix in Chat

The Fix in Chat button appears in several contexts when the extension identifies errors or issues. Click the button to generate an AI chat prompt that summarizes the problem, includes relevant details and context, and gives specific instructions for the agent.

Data and telemetry

Datadog collects certain information about your usage of this IDE, including how you interact with it, whether errors occurred while using it, what caused those errors, and user identifiers in accordance with the Datadog Privacy Policy and Datadog’s VS Code extension EULA. This data is used to help improve the extension’s performance and features, including transitions to and from the extension and the applicable Datadog login page for accessing the Services.

If you don’t wish to send this data to Datadog, you can disable this at any time in the extension’s settings: Datadog > Telemetry > Setup > Enable Telemetry and select disabled.

The Datadog extension also honors the VS Code telemetry setting.

Help and feedback

To share your feedback, email [email protected] or create an issue in the extension’s public repository.

Check out the issues section to discover known issues.

Do you use Cursor, or another fork of VS Code? Find the extension on the Open VSX Registry.

License

Read the End-User License Agreement carefully before downloading or using this extension.

Further Reading