Updated on 2026-08-27 GMT+08:00

Using Code Server for Code Development

Code Server is an open-source project that allows you to run Visual Studio Code on a remote server and access it entirely through a web browser. The following capabilities are supported:

  • Full VS Code experience: Supports nearly all native features including the extension marketplace, debugger, terminal, Git, and more.
  • Cross-platform access: Write code on any device using just a browser.
  • Unified development environment: Code, configurations, and dependencies are all deployed on the server, ensuring environment consistency.
  • Private deployment: Users have complete control over their data.

This topic introduces how to use Code Server in a notebook instance for code development.

Notes

Constraints

The notebook instance you create must meet the following conditions:

  • Code Server has been configured.
    • If no notebook instance has been created, select Code Server in environment settings when creating a notebook instance.
      Figure 1 Code Server
    • If a notebook instance has been created, check whether Code Server is configured in the Basic Information tab of the notebook instance details page.
      Figure 2 Notebook instance details page
  • The OSs of some container image versions do not support Code Server. The constraints are as follows:
    To view the OS of the container image, note that the preset image address is pytorch_cuda: pytorch_2.7.0-cuda_12.8-py_3.11.10-ubuntu_22.04-x86_64-20251215163925-4e5422a. The OS is ubuntu_22.04.
    Table 1 Supported OS types

    Container Image OS

    Architecture

    Code Server

    ubuntu_18.04

    x86

    Not supported

    ubuntu_20.04

    x86

    Supported

    ubuntu_22.04

    x86

    Supported

    hce_2.0/hce2.0

    Arm

    Supported

    euler_2.8.3/euler2.8.3

    Arm

    Supported

    euler_2.10/euler2.10

    Arm

    Supported

Starting Code Server

  1. Log in to the ModelArts console and perform the following operations as required:
    • New console: Choose Model Build > Notebook.
    • Old console: Choose Development Space > Notebook.
  2. In the Operation column of a running notebook instance, click Access Environment. In the WebIDE tab page of the Access Method dialog box, click Access on the right of Code Server Access.
    Figure 3 Code Server access

    After the access is successful, you can see that the GUI layout, operation logic, and functions of the Code Server are the same as those of the VS Code desktop edition.

Code Server Features

The following describes the interface layout and functions, core features, and extension marketplace of Code Server.

Interface Layout and Features

The Code Server interface is divided into the following main areas.

Table 2 Code Server areas

Area

Description

Top menu bar

Displays the name of the currently open file or folder, along with window control buttons.

Left activity bar

Contains multiple icon buttons used to switch between different views, supporting the following features:

  • Explorer: Browse and manage project files.
  • Search: Search for file content and symbols across the project.
  • Source Control: Integrated Git operations, supporting commits, branch management, difference viewing, etc.
  • Run and Debug: Configure and run debugging tasks.
  • Extensions: Manage extension installations and configurations.
  • Testing: Configure and run test cases.
  • GitLens: A powerful Git extension supporting code history, difference tracking, and more.
  • Cline: AI coding assistant, an intelligent development extension powered by LLMs.

Left side bar

Displays the specific content of the view selected in the activity bar, such as the file tree, search results, or extension lists.

Editor area

The main area for editing code, supporting multiple open tabs, code highlighting, syntax prompt, and more.

Bottom status bar

Displays information about the current file's language mode, line and column numbers, Git branch, errors/warnings, and more.

Integrated terminal

Located at the bottom; supports creating multiple terminal instances to run multiple commands simultaneously.

Core Features

  • Full extension ecosystem: Code Server uses the Open-VSX extension marketplace by default. You can search for and install the vast majority of popular open-source extensions, such as Python, GitLens, and Prettier, via on the left.
  • Built-in terminal and Git: The integrated terminal is a major highlight, allowing you to complete the entire workflow from coding to building, testing, and deployment right inside your browser, delivering an experience just like local development. Meanwhile, the source code management view integrates Git operations, making it easy to commit code, manage branches, and view differences.
  • Convenient port forwarding: When developing web applications or needing to access specific service ports on the server, you can use Code Server's built-in port forwarding feature. You can easily map remote ports to your local machine within the PORTS panel for convenient debugging.
  • Settings sync and persistence: Code Server's configurations, themes, keyboard shortcuts, and installed extensions are all saved in the configuration directory on the server. This means no matter which device you log in from, you will get a completely consistent development environment.

Extension Marketplace

The Code Server extension marketplace provides a rich selection of development tools. The notebook instance comes pre-installed with several commonly used extensions, and you can also download additional ones as needed.

Figure 4 Extension marketplace

The pre-installed extensions in the notebook instance and their descriptions are as follows.

Table 3 Pre-installed extensions

Extension

Version

Description

Python

2025.6.1

Python language support, providing features like code completion and syntax checking.

Python Debugger

2025.18.0

Python debugger, supporting breakpoint debugging, variable inspection, and more.

Python Environments

1.10.0

Automatically detects, manages, and activates different Python interpreters and virtual environments.

Code Spell Checker

4.1.0

Real-time spell checking for English words in source code, comments, and documentation, supporting camelCase and snake_case naming conventions.

EditorConfig for VS Code

0.16.6

Helps teams define and maintain consistent coding styles.

GitLens

17.1.1

A powerful Git extension supporting code history, diff tracking, and more.

isort

2023.11.0-dev

Automatically sorts, groups, and formats import statements in your code.

Jupyter

2024.8.1

Jupyter Notebook support.

Jupyter Cell Tags

0.1.9

Jupyter cell tag management.

Jupyter Keymap

1.1.2

Jupyter keyboard shortcuts.

Jupyter Notebook Renderers

1.0.19

Jupyter Notebook renderers.

Jupyter Slide Show

0.1.6

Jupyter slideshow presentation.

Pyright

1.1.400

A standard static type checker for Python, designed to improve type safety, development efficiency, and code quality in large Python codebases.

Cline

3.75.0

AI coding assistant, an intelligent development extension powered by LLMs.

You can also download other required extensions from the marketplace. Taking Markdown extensions as an example: type Markdown into the search bar, select the extension you need to download, and click Install.

Debugging Python Code

The notebook instance comes pre-installed with Python-related dependency extensions in Code Server, allowing you to start debugging Python code directly.

Preparing Code

  1. Right-click in the workspace to create a new Python file with a .py extension, for example, test.py.
    Figure 5 Creating a new Python file
  2. Copy and paste the following Python code into the file:
    import os 
    print(os.environ.get('PATH'))
    print("Hello World")
    print("Welcome to Code Server")
    Figure 6 Copying Python code

Running the Python File

Click in the upper right corner of the Python file, and the TERMINAL tab at the bottom will display the execution results.

Figure 7 TERMINAL execution results

Debugging the Python File

  1. Add a breakpoint to the Python file. Left-click to the left of the line numbers to add or remove breakpoints.
    Figure 8 Adding a breakpoint
  2. In the left activity bar, click , click Run and Debug and choose Python Debugger. In the Select a debug configuration pop-up, choose Python File: Debug the currently active Python file to enter debugging mode.
  3. The code will run and pause at the first breakpoint. You can inspect variables in the left panel or use the top control bar to retry, continue, or perform other actions.