Visual Studio Code (ビジュアルスタジオ・コード、VS Code )はMicrosoft が開発しているWindows 、Linux 、macOS 、Web 用のソースコードエディタ である[ 7] 。Electron をベースにしており、デバッグ 、埋め込みGit コントロールとGitHub 連携、シンタックスハイライト 、インテリジェントなコード補完 、スニペット 、コードリファクタリング のサポートが含まれる。カスタマイズ性が高く、テーマやキーボードショートカット、環境設定を変更できたり、機能を追加する拡張機能をインストールすることができる。ソースコードはフリーかつオープンソースで、寛容なMITライセンス の下でリリースされている[ 8] 。コンパイルされたバイナリはプロプライエタリソフトウェア である[ 9] 。
Stack Overflow 2024 Developer Surveyでは、Visual Studio Codeが最も使用されている統合開発環境 (エディタを含む)としてランクインし、複数回答ありで73.6%が使用していると回答した[ 10]
。
歴史
Visual Studio Codeは、マイクロソフトの開発者会議Build 2015(2015年4月29日)にて公開され、プレビュー版がリリースされた[ 11] 。
2015年11月18日、Visual Studio Codeはリリースされ、その一部ソースコード がGitHub にMIT License のもとで公開された。その際、拡張機能のサポートも追加された[ 12] 。
機能
Visual Studio Codeのソースコードエディタの機能は、以下の一覧に示されるように、プログラミング言語 ごとにサポートの有無が異なっている。プラグイン によって他の言語もサポートできる[ 13] 。
Visual Studio Codeの機能の多くはメニュー やユーザーインタフェース を通して公開されていない。代わりに、コマンドパレット (例: スニペット の挿入)あるいは.json設定ファイル (例: ショートカットキー の設定)を経由してアクセスする。コマンドパレットはキャラクタユーザインタフェース の一種である。
ディレクトリ を開くことで、そのディレクトリに含まれる複数のファイル がツリー状に表示される。開いたファイルはタブ にも表示され、タブを切り替えながら複数のファイルを並行して編集できる。ただしWeb版の場合、Google Chrome やMicrosoft Edge など一部のChromium系ブラウザでしかディレクトリを開くことはできない。これは、Visual Studio CodeがFile System Access APIというAPIを使用してディレクトリを操作するためである[ 14]
また、テキストエディタの基本的な機能として、文書の保存時にコードページ を変更したり、改行コード を統一することもできる。対応する括弧の表示、複数カーソル、矩形 選択、ブロック単位の選択拡張と折り畳み、Gitリポジトリと比較しての変更行の表示などの機能を持つ[ 15] 。
その他に、ウィンドウ内で統合された端末 を開くことや、ウェブ上に公開された機能拡張 をダウンロード しインストールすることもできる。
リモート開発
Microsoftが提供する拡張機能パック「Remote Development [ ※ 1] 」(2020年2月26日現在Preview版)を導入することで、リモート環境での開発が可能になる。対応するリモート環境は以下の3つである[ 16] 。
コンテナ
拡張機能「Visual Studio Code Remote - Containers」を利用することでDockerコンテナ内での開発が可能になる[ 17] 。
Docker Desktop 2.0+ あるいはDocker CE/EE 18.06+がインストールされたホストマシンからコンテナ内の開発環境を操作できる。ホストマシンにプログラミング言語実行環境をインストールしなくてもコンテナ内でコーディング支援・デバッグ等が利用可能になる。
コンテナを利用する場合、いくつかの方法が存在する。そのうちの1つはGitリポジトリから直接コンテナを生成する方法である。開発環境コンテナとしての設定がdevcontainer.jsonに記述されたGitリポジトリは、VS Code上で明示的なClone無しにコンテナ化が可能である[ 18] 。この「Repositoryコンテナ」生成時にはGitリポジトリがDockerのVolumesへ保存される[ 19] (bind mountsではない。参考: Docker#永続化 )。
この機能はコンテナ内にVS Code Serverを建てることで実現されている[ 20] 。ローカルでVS Codeを実行するのと同様にコンテナ内でVS Code(Server)が立ち上がっており(/root/.vscode-server)、クライアント(ローカル)側でおこなったVS Code UI操作をコンテナへ送信することで透過的にコンテナ内開発を行うことができる。
生成された開発環境(volume)はVS Code の Remote Explorer タブから管理(アクセス・削除)が可能である。実体は Docker の Containers および Volumes であるため、Docker 側からの削除も可能である。
評価
2016年 のStack Overflowによる調査では、Visual Studio Codeは、13番目に人気のある開発ツールで、46613人のうち、7.2%がこれを使っていた[ 21] 。しかしながら、2019年 の調査では、Visual Studio Codeは1位に位置し、87317人の回答者のうち、50.7%がこれを使っていた[ 22] 。2021年 の調査でも、82,277人の回答者の71.06%が利用していると答え、1位であった[ 23] 。
Visual Studio Codeは、Java 、JavaScript 、Go 、Node.js 、C++ など様々な領域でフレキシブルに利用可能である[ 24] 。
マイクロソフトによるデータの収集
Visual Studio Codeは、「Code - OSS」リポジトリの配布物にマイクロソフト 独自のカスタマイズを施し、通常のマイクロソフトの製品ライセンスの下でリリースされている[ 25] 。また、Visual Studio Codeは使用状況に関するデータを収集し、マイクロソフトに送信する。ただし、このテレメトリー・レポーティングは無効にすることができる[ 26] 。
VSCodiumは、もうひとつのこのソフトウェアのバイナリ ディストリビューションであり、これはオープンソース の部分のみを使い、マイクロソフトの商標やテレメトリーコンポーネントは除去されている。しかし、他の面においては完全に機能し、互換性がある[ 27] 。
関連項目
注釈
出典
^ "Release 1.99.3" . 17 April 2025.
^ "Visual Studio Code Insiders (Install) 1.99.0.20250311" . 2025年3月13日閲覧 。
^ [1] , VS Code, "Requirements for Visual Studio Code"
^ “Display Language (Locale) ”. 2018年11月30日閲覧。
^ “マイクロソフト ソフトウェア ライセンス条項 ”. 2017年7月1日閲覧。
^ “LICENSE.txt ”. github.com/Microsoft/vscode . マイクロソフト (2015年11月17日). 2016年3月24日閲覧。
^ Lardinois, Frederic (2015年4月29日). “Microsoft Launches Visual Studio Code, A Free Cross-Platform Code Editor For OS X, Linux And Windows” . TechCrunch . https://techcrunch.com/2015/04/29/microsoft-shocks-the-world-with-visual-studio-code-a-free-code-editor-for-os-x-linux-and-windows
^ Comment on Menu license links to non Open Source license , VS Code Repository on Github
^ VS Code FAQ , VS Code, "VS Code is free for private or commercial use."
^ “Technology | 2024 Stack Overflow Developer Survey ”. survey.stackoverflow.co . 2024年8月3日閲覧。
^ Montgomery, John (2015年4月29日). “BUILD 2015 News: Visual Studio Code, Visual Studio 2015 RC, Team Foundation Server 2015 RC, Visual Studio 2013 Update 5 ”. 2016年3月24日閲覧。
^ “Visual Studio now supports debugging Linux apps; Code editor now open source” . Ars Technica . http://arstechnica.com/information-technology/2015/11/visual-studio-now-supports-debugging-linux-apps-code-editor-now-open-source/ 2015年11月18日閲覧。
^ a b “Language Support in Visual Studio Code ”. マイクロソフト . 2016年3月24日閲覧。
^ “Microsoftがブラウザで動作するVisual Studio CodeのVSCode.Devをローンチ ”. InfoQ . 2023年2月18日閲覧。
^ “Editing Evolved ”. 2016年5月13日閲覧。
^ Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. [2]
^ The Visual Studio Code Remote - Containers extension lets you use a Docker container as a full-featured development environment. Visual Studio Container - Developing inside a Container
^ You can now work with the repository source code in this isolated environment as you would if you had cloned the code locally. [3]
^ Repository Containers use isolated, local Docker volumes instead binding to the local filesystem. [4]
^ (in figure) Remote OS VS Code Server Visual Studio Code - VS Code Remote Development
^ “Developer Survey Results 2016 ”. Stack Overflow Insights . Stack Exchange . 2018年4月7日閲覧。
^ “Developer Survey Results 2019 - Most Popular Development Environments ”. StackOverflow Insights . Stack Exchange. 2019年4月10日閲覧。
^ “Stack Overflow Developer Survey 2021 - Integrated Development Environment ”. 2022年1月3日閲覧。
^ Visual Studio Code: A fast, lightweight, cross-platform code editor
^ https://code.visualstudio.com/docs/supporting/faq#_what-is-the-difference-between-the-vscode-repository-and-the-microsoft-visual-studio-code-distribution
^ “Visual Studio Code Telemetry ”. Visual Studio Code . Microsoft. 2024年10月7日閲覧。 “With the telemetry.telemetryLevel user setting, you can control the different types of telemetry we send with a single setting. Here is a table of the different types of data sent with each value of telemetry.telemetryLevel:”
^ binary releases of VS Code without MS branding/telemetry/licensing: VSCodium/vscodium , VSCodium, (2019-03-17), https://github.com/VSCodium/vscodium 2019年3月18日閲覧。
外部リンク
人物
創業者 取締役会 上級幹部チーム コーポレート バイスプレジデント
ソフトウェア
開発言語 技術 オンラインサービス
ゲーム ハードウェア 教育と認識
ライセンス 会議 批判 訴訟 買収企業
キャラクター 関連人物 部門