Skip to main content

Visual Studio Code

To get DCM warnings (for example, from lint rules or unused code checks) in VS Code, install the DCM VS Code extension.

Prerequisites​

Before setting up the IDE extension, ensure that your system meets the following requirements:

  • Operating System: 64-bit Windows, Linux, or macOS
  • Software: Installed Dart / Flutter SDK

you can install the DCM extension from the VS Code marketplace:

  1. Open VS Code.
  2. Navigate to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
  3. Search for "DCM" and click Install on the DCM extension from the results.

Alternatively, you can visit the VS Code extension page and follow the instructions.

Ensuring Team-Wide IDE Extension Installation​

To ensure that all team members using VS Code have the necessary extensions installed, configure the "Workspace recommended extensions":

  1. Create or update the .vscode/extensions.json file in your project directory.

  2. Add the following configuration:

    {
    "recommendations": ["publisher.dcm"]
    }

Refer to the Workspace recommended extensions documentation for more details.

Ensuring Consistent Executable Versions Across the Team​

To ensure that all team members use the same version of the DCM executable, configure the version constraints in your project's dcm_global.yaml file:

  1. Open or create the dcm_global.yaml file in your project root.

  2. Set the version constraint:

    version: '>=1.15.0 <2.0.0'

For more information on global configuration options, refer to the global configuration documentation.