Home > Article > Development Tools > How to compile and run vscode source code
##1. Prepare the environment
GitNode.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.exe2. Install the compiler for the native modules that VSCode depends onOption 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 EditionSelect to use C for desktop developmentSelect the desktop VC 2015.3 v14.00 (V140) toolset on the right hand sideNOTE: 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.git2. Enter the vscode directory and execute the yarn command
cd vscode yarn3. Listening program
yarn watchcmd output: 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.batNext console output: And open a vscode.exe at the same time Recommended related article tutorials:
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!