Go to file
2015-11-17 16:00:11 +01:00
.vscode launch.json: add 'Attach to VSCode' configuration. 2015-11-16 14:34:15 +01:00
build Add reference to DefinitelyTyped, updated the TypeScript version, and generate a new thirdpartynotices.txt 2015-11-13 15:48:38 +01:00
extensions Python: Block comment is three single quotes and not two #18 2015-11-16 10:49:28 +01:00
resources fixes #28 2015-11-16 12:07:17 +01:00
scripts Hello Code 2015-11-13 14:39:38 +01:00
src Javascript mode instantiated twice, issue #34 2015-11-17 16:00:11 +01:00
test fix osx file limit issue in tests 2015-11-16 11:22:53 +01:00
.gitignore Hello Code 2015-11-13 14:39:38 +01:00
gulpfile.common.js fix copyright statements in minified build 2015-11-16 11:22:53 +01:00
gulpfile.editor.js Hello Code 2015-11-13 14:39:38 +01:00
gulpfile.js mixin repo instead of url 2015-11-14 06:18:49 +01:00
gulpfile.plugins.js Hello Code 2015-11-13 14:39:38 +01:00
gulpfile.vscode.js real fix for: gulp-symdest does not preserve links on electron #2 2015-11-16 16:10:30 +01:00
LICENSE.txt Hello Code 2015-11-13 14:39:38 +01:00
npm-shrinkwrap.json update vscode-textmate 2015-11-13 18:17:22 +01:00
OSSREADME.json Hello Code 2015-11-13 14:39:38 +01:00
package.json real fix for: gulp-symdest does not preserve links on electron #2 2015-11-16 16:10:30 +01:00
product.json fixes #28 2015-11-16 12:07:17 +01:00
README.md formatting 2015-11-16 15:19:20 +01:00
ThirdPartyNotices.txt Add reference to DefinitelyTyped, updated the TypeScript version, and generate a new thirdpartynotices.txt 2015-11-13 15:48:38 +01:00

Visual Studio Code

VS Code is a new choice of tool that combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It is the first editor and first cross platform tool in the Visual Studio family of products.

Code incorporates Visual Studio's world class editing and debugging experiences whlie integrating with your existing tool chain. A rich extensibility model and ecosystem provides support for a broad array of languages and tools that integrate seamlessly with Code.

The VSCode repository is where the Code team does development. We encourage you to follow along, take part in the discussion, submit issues, suggest a feature, or create a pull request!

Follow us @code.

Installation and Documentation

Download the latest build for your platform from the Visual Studio Code website. Once installed, Code will automatically update itself when we publish new releases.

Everything you need to know about using and extending Code can be found in our online documentation. Found a typo? Want to clarify something? Clone the vscode-docs repository and make a pull request.

Contributing

There are many ways to contribute to the Code project. For example:

Check out How to Contribute for more information.

Build and Run From Source

If you want to understand how Code works or want to debug an issue, you'll want to get the source, build it, and run the tool locally.

Installing Prerequisites

Download the latest version of Visual Studio Code (you will use Code to edit Code!)

VS Code includes node module dependencies that require native compilation. To ensure the compilation is picking up the right version of header files from the Electron Shell, we have our own script to run the installation via npm (scripts/npm).

Tip! In case you fail to build the native modules you can copy the node_modules folder of the VS Code installation into the VSCode workspaces node_modules folder. You will still need to run scripts/npm install to get all the development dependencies installed.

For native compilation, you will need python (version v2.7 recommended, v3.x.x is not supported) as well as a C/C++ compiler tool chain.

Windows:

  • In addition to Python v2.7, make sure you have a PYTHON environment variable set to drive:\path\to\python.exe, not to a folder
  • Visual Studio 2013 for Windows Desktop or Visual Studio 2015 , make sure to select the option to install all C++ tools and the Windows SDK

OS X Command line developer tools

  • Python should be installed already
  • XCode and the Command Line Tools (XCode -> Preferences -> Downloads), which will install gcc and the related toolchain containing make

Linux:

  • Python v2.7
  • make
  • A proper C/C++ compiler toolchain, for example GCC

After you have these tools installed, run the following commands to check out Code and install dependencies:

OS X

git clone https://github.com/microsoft/vscode
cd vscode && npm install -g mocha gulp
./scripts/npm.sh install

Windows

git clone https://github.com/microsoft/vscode
cd vscode
npm install -g mocha gulp
scripts\npm install

Linux

git clone https://github.com/microsoft/vscode
cd vscode && npm install -g mocha gulp
./scripts/npm.sh install --arch=x64
# for 32bit Linux
#./scripts/npm.sh install --arch=ia32

Development Workflow

Incremental Build

Open VS Code on the folder where you have cloned the vscode repository and press CTRL+SHIFT+B on Windows or COMMAND+SHIFT+B on OSX to start the TypeScript builder. It will do an initial full build and then watch for file changes, compiling those changes incrementally. To view the build output open the Output stream by pressing Shift+CMD+U.

Errors and Warnigns

Errors and warnings are indicated in the status bar at the bottom left. You can view the error list using View | Errors and Warnings or pressing CMD+P and then !. Please note, if you start the TypeScript builder from a terminal using gulp watch, errors and warnings will only show in the console and not in Code.

Tip! You do not need to stop and restart the development version after each change, you can just execute Reload Window from the command palette.

Validate your changes

To test the changes you launch a development version of VS Code on the workspace vscode, which you are currently editing.

OS X and Linux

./scripts/code.sh

Windows

.\scripts\code.bat

You can identify the development version of Code by the Electron icon in the Dock or Taskbar.

Tip! If you receive an error stating that the app is not a valid Electron app, it probably means you didn't run gulp watch first.

Debugging

Code has a multi-process architecture and your code is executed in different processes.

The render process runs the UI code inside the Shell window. To debug code running in the renderer you can either use VS Code or the Chrome Developer Tools.

Using VSCode

  • Install the Debugger for Chrome extension. This extension will let you attach to and debug client side code running in Chrome.
  • Launch the development version of Code with the following command line option:

OSX and Linux

./tools/run.sh --remote-debugging-port=9222

Windows

tools\run --remote-debugging-port=9222
  • Choose the Attach to VSCode launch configuration from the launch dropdown in the Debug viewlet and press F5.

Using the Chrome Developers Tools

  • Run the Developer: Toggle Developer Tools command from the Command Palette in your development instance of Code to launch the Chrom tools.

The extension host process runs code implemented by a plugin. To debug extensions (including those packaged with Code) which run in the extension host process, you can use VS Code itself. Switch to the Debug viewlet, choose the Attach to Extension Host configuration, and press F5.

Unit Testing

Press SHIFT+CMD+T (CTRL+SHIFT+T on Windows) to start the unit tests or run the tests directly from a terminal by running mocha from the vscode folder. The /test README has complete details on how to run and debug tests, as well as how to produce coverage reports.