JetBrains CodeCanvas 2024.2 Help

Open Code in Dev Environment

Opening the project code in a dev environment looks different depending on the IDE you use: IntelliJ-based IDEs (like IntelliJ IDEA, PyCharm, WebStorm, etc.) or Visual Studio Code (VS Code).

IntelliJ-based IDEs

If you use an IntelliJ-based IDE, you can open the project code in a dev environment either via CodeCanvas or via JetBrains Gateway.

Prerequisites

  1. Open JetBrains Gateway.

  2. If not yet connected to CodeCanvas:

    1. In the list of Connections, select JetBrains CodeCanvas.

    2. Click Connect to CodeCanvas.

    3. Specify the URL of your CodeCanvas instance and click Continue in Browser.

    4. In the browser, click Accept to grant JetBrains Gateway access to your CodeCanvas account.

    5. Return to JetBrains Gateway.

  3. Сlick New environment.

    Gateway. New environment
  4. Specify the environment name and other settings:

    • Template – the template that will be used as a base for the environment. The template defines dev environment resources, the Git repository, the IDE, and other settings.

      Learn more about templates

    • Branch – the branch of the project repository that will be checked out in the environment. By default, CodeCanvas uses the branch specified in the template. In case you have multiple repositories in the template, you can add branch overrides for each repository.

    • Warm-up snapshot – a warm-up snapshot that will be used to initialize the environment. Typically, warm-up snapshots contain project indexes, caches, dependencies, and other data that can significantly speed up the environment start.

      Warm-up and branches

      CodeCanvas automatically selects the most recent suitable snapshot. The Best match is when the snapshot is based on the same branch as the created environment. If no exact match is found, CodeCanvas will use the snapshot based on the branch specified in the template. This is considered a Good match and may result in a longer environment start due to potential index rebuilding. If no snapshot is found, a new environment starts from scratch.

      For example, your template branch is main and there is a warm-up snapshot based on the main branch. If you create an environment based on the main branch, CodeCanvas will use this snapshot as the Best match.

      Now, imagine you want to create an environment based on the feature branch. As there is no snapshot for the feature branch, CodeCanvas will use the main branch snapshot. This is considered a Good match. The startup time may be longer because the IDE might need to rebuild some project indexes.

      Learn more about warm-up snapshots

    • Personal parameters – if the project requires sensitive parameters (like API keys, passwords, etc.), you should provide them here. There can be Required parameters (obligatory) and Optional parameters (you can skip them). You can't provide a plain text value, instead, you should use a reference to parameter in your personal parameter storage.

      Learn how to create parameters in your personal storage

  5. Click Create Environment.

    This will start creating the environment. Once the environment is ready, Gateway will automatically open the IDE.

  1. In CodeCanvas, click the CodeCanvas logo in the upper-left corner. This page lists all your dev environments.

  2. Click New environment.

    New dev environment
  3. On the Select template tab, select the template that will be used as a base for the environment. The template defines dev environment resources, the Git repository, the IDE, and other settings.

    Learn more about templates

  4. If the project requires sensitive parameters (like API keys, passwords, etc.), switch to the Provide personal parameters tab and provide them here.

    There can be Required parameters (obligatory) and Optional parameters (you can skip them). You can't provide a plain text value, instead, you should use a reference to parameter in your personal parameter storage.

    Learn how to create parameters in your personal storage

  5. On the Other settings tab, specify the environment name and other settings:

    • Branch – the branch of the project repository that will be checked out in the environment. By default, CodeCanvas uses the branch specified in the template. In case you have multiple repositories in the template, you can add branch overrides for each repository.

    • Use warm-up snapshot – whether to use a warm-up snapshot for initializing the environment. Typically, warm-up snapshots contain project indexes, caches, dependencies, and other data that can significantly speed up the environment start.

      Warm-up and branches

      CodeCanvas automatically selects the most recent suitable snapshot. The Best match is when the snapshot is based on the same branch as the created environment. If no exact match is found, CodeCanvas will use the snapshot based on the branch specified in the template. This is considered a Good match and may result in a longer environment start due to potential index rebuilding. If no snapshot is found, a new environment starts from scratch.

      For example, your template branch is main and there is a warm-up snapshot based on the main branch. If you create an environment based on the main branch, CodeCanvas will use this snapshot as the Best match.

      Now, imagine you want to create an environment based on the feature branch. As there is no snapshot for the feature branch, CodeCanvas will use the main branch snapshot. This is considered a Good match. The startup time may be longer because the IDE might need to rebuild some project indexes.

      Learn more about warm-up snapshots

  6. Click Create.

    This will open JetBrains Gateway and start creating the environment. Once the environment is ready, Gateway will automatically open the IDE.

Visual Studio Code

To work with VS Code dev environments, CodeCanvas uses the JetBrains CodeCanvas extension. The extension is based on the 'Remote Development using SSH' feature of VS Code. It allows working with files and folders on a remote machine using SSH.

Prerequisites

  1. Open JetBrains Gateway.

  2. If not yet connected to CodeCanvas:

    1. In the list of Connections, select JetBrains CodeCanvas.

    2. Click Connect to CodeCanvas.

    3. Specify the URL of your CodeCanvas instance and click Continue in Browser.

    4. In the browser, click Accept to grant JetBrains Gateway access to your CodeCanvas account.

    5. Return to JetBrains Gateway.

  3. Сlick New environment.

  4. Specify the environment name and other settings:

    • Template – the template that will be used as a base for the environment. The template defines dev environment resources, the Git repository, the IDE (VS Code), and other settings.

      Learn more about templates

    • Branch – the branch of the project repository that will be checked out in the environment. By default, CodeCanvas uses the branch specified in the template. In case you have multiple repositories in the template, you can add branch overrides for each repository.

    • Warm-up snapshot – a warm-up snapshot that will be used to initialize the environment. Typically, warm-up snapshots contain project indexes, caches, dependencies, and other data that can significantly speed up the environment start.

      Learn more about warm-up snapshots

    • Personal parameters – if the project requires sensitive parameters (like API keys, passwords, etc.), you should provide them here. There can be Required parameters (obligatory) and Optional parameters (you can skip them). You can't provide a plain text value, instead, you should use a reference to parameter in your personal parameter storage.

      Learn how to create parameters in your personal storage

  5. Click Create Environment.

    This will start creating the environment. Once the environment is ready, JetBrains Gateway will automatically open VS Code with your project code.

  1. In CodeCanvas, click the CodeCanvas logo in the upper-left corner. This page lists all your dev environments.

  2. Click New environment.

  3. On the Select template tab, select the template that will be used as a base for the environment. The template defines dev environment resources, the Git repository, the IDE, and other settings.

    Learn more about templates

  4. If the project requires sensitive parameters (like API keys, passwords, etc.), switch to the Provide personal parameters tab and provide them here.

    There can be Required parameters (obligatory) and Optional parameters (you can skip them). You can't provide a plain text value, instead, you should use a reference to a parameter in your personal parameter storage.

    Learn how to create parameters in your personal storage

  5. On the Other settings tab, specify the environment name and other settings:

    • Branch – the branch of the project repository that will be checked out in the environment. By default, CodeCanvas uses the branch specified in the template. In case you have multiple repositories in the template, you can add branch overrides for each repository.

    • Warm-up snapshot – a warm-up snapshot that will be used to initialize the environment. Typically, warm-up snapshots contain project indexes, caches, dependencies, and other data that can significantly speed up the environment start.

      Learn more about warm-up snapshots

  6. Click Create.

    This will start creating the environment. Once the environment is ready, VS Code will be automatically opened.

Work with multiple repositories

If you have multiple Git repositories, you can open them all in a single dev environment. To do this, you need to create a dev environment template that includes all the required repositories. Learn how to configure a template for multi-repository projects.

After you start the environment, the IDE opens all project roots specified in the template. By default, a project root is the root directory of the repository. Note that currently, it is not possible to use different IDEs for different repositories in a single dev environment.

Last modified: 05 September 2024