docsvs-code-tutorial
Last edit August 07, 2024

Creating a VS Code Instance

This is a tutorial of how to create a VS Code on DiPhyx

This comprehensive guide provides step-by-step instructions for utilizing the powerful features of VS Code on DiPhyx. By following these instructions, you will set up your development environment, which allows you to leverage advanced editing capabilities, explore integrated debugging tools, and maximize your productivity with the extensive extension ecosystem available in VS Code.

You can also watch our video tutorial on how to create a VS Code project on DiPhyx here:

Prerequisites

No prerequisites are required.

Steps

Creating the VS Code project

1. Navigate to Software Packages

Navigate to Software Packages Page in DiPhyx Dashboard.

2. Search for VS Code

Type "vs code" in the "Filter by name" field and press ENTER.

3. Click "View Details"

4. Select Compute Unit

On the VS Code software package page, choose the desired compute unit from the "Select compute unit" option menu. This allows you to select the suitable compute unit from the list of available units in the READY state.

Tip: If you don't have any available compute unit or need to create a new one for this project instance, we recommend following our guide on How to Create a Compute Unit on DiPhyx for step-by-step instructions.

5. Click "Create Instance"

After selecting a compute unit, click "Create Instance".

6. Fill in The Fields

On 'Create new project' dialog:

  • Ensure that the Project Name is unique and not already in use within the same compute unit to avoid any conflicts.
  • The Volume specifies the directory on the compute unit that is mounted into the VS Code instance. You don't need to change the default path.
  • The Password refers to the password you will use when opening the interactive session.
  • The Working directory is essentially the context in which VS Code is operating.

Select a unique name for your VS Code project.

Select a secure password , which you will use to open an interactive session for VS Code.

7. Create The Project Instance

Wait for a few seconds while the project is being created.

8. Click "View projects"

After the project is created, navigate to it by clicking on "View projects".

Starting the VS Code project

1. Navigate to the instance page

Navigate to page "Demo vs code instance", which is the name of the project.

2. Start the project

From the "more options" menu, click "Start".

Tip: You can also start your project from the projects list in the compute unit page. 

3. Confirm "Start"

Viewing VS Code project logs

1. Navigate to your VS Code instance page

2. View logs

In the last section of the instance page, you can view all the logs in the selected time frame.

Using VS Code (Interactive Session)

1. Click "Interactive session"

On the instance page, click the interactive session button. This will open a session for your VS Code instance, then you can start using the software right away.

2. Click "Open session"

3. Enter the password

You need the password you entered when you were creating the project.

Tip: You can access and copy VS Code interactive session password on the instance page, the Environment section.

4. Submit the password

5. Start using VS Code!

Closing the interactive session

If you are using a shared computer, you can close the interactive session you have opened for extra security. You can do this by following the steps below.

1. Click "Interactive session"

On the instance page, click on the "Interactive session" button.

2. Click "Close session"

Close the interactive session by clicking "Close session". Once you do this, you will not be able to access VS Code through the address you used to do, unless you open the session again.