Home  >  Article  >  Development Tools  >  How to compile and run vscode source code

How to compile and run vscode source code

王林
王林Original
2020-02-12 17:47:176046browse

How to compile and run vscode source code

##1. Prepare the environment

Git

Node.js (64-bit, >= 8.12.0, < ; 9.0.0)

Python (preferably version 2.7, version 3.0 and above is not supported)

1. Set PYTHON to point to your environment variable python.exe. For example: C:\Python27\python.exe

2. Install the compiler for the native modules that VSCode depends on

Option 1 (recommended): Use Windows Build Tools npm module

Launch Powershell as administrator and install the Windows Build Tools npm module (documentation).

npm install --global windows-build-tools --vs2015

NOTE: The --debug flag can be useful if you encounter any problems during installation.

Note: If you encounter an error, the build tool for v141 (Platform Toolset = 'v141') cannot be found. "You may have a version of Visual Studio installed. Either uninstall that version or make sure to install the VC 2015.3 v14.00 (v140) Desktop Installation Toolset

Option 2: Use Visual Studio 2017

Install Visual Studio 2017 Community Edition

Select to use C for desktop development

Select the desktop VC 2015.3 v14.00 (V140) toolset on the right hand side

NOTE: If you encounter an error "Build Tools V141 (platform-toolset="V141") cannot be found". Make sure you have the toolset for Desktop VC 2015.3 v14.00 (V140) installed

Restart your computer Warning: Make sure your configuration file path only contains ASCII letters, such as John, otherwise it may cause issues with node gyp usage (nodejs/node-gyp/issues#297)

NOTE: Building and debugging via Windows Subsystem for Linux (WSL) is not currently supported.

2. Compile and run

Please follow the steps below:

1. Download the code (either through git clone or through How to download the zip package)

git clone https://github.com/Microsoft/vscode.git

2. Enter the vscode directory and execute the yarn command


cd vscode
yarn

3. Listening program

yarn watch

cmd output:

How to compile and run vscode source code

4. Open the new cmd again, do not close the original listening cmd, and execute the .\scripts\code.bat command in the directory corresponding to the new cmd

.\scripts\code.bat

Next console output:

How to compile and run vscode source code

And open a vscode.exe at the same time

How to compile and run vscode source code

Recommended related article tutorials:

vscode tutorial

The above is the detailed content of How to compile and run vscode source code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn