pythonPath will use the specified virtualenv, where as exceptionHandling allows you to ignore specific exceptions that are raised. There are a couple of non standard settings in that snippet above such as pythonPath and exceptionHandling. "pythonPath": "VIRTUALENV_PATH/bin/python", It's helpful to have a virtualenv in each project, which will allow you to utilise $/console.py", Note: VIRTUALENV_PATH points to whatever directory your preferred virtualenv is located in and must be an absolute path.
Open up your Preferences ( Code > Preferences > User Settings) and then modify the values to the following: There are a couple of changes in your user preferences that you'll want to make to get VS Code working as best as possible. VS Code IconsÄ«rings file icons to the Explorer pane. Status Bar TasksÄisplays any tasks that you've configured in the Status Bar (down the bottom left), which can then be run just by clicking on them. Synchronize Settings, Snippets, launch, keybindings files and extensions Across Multiple Machines using Github GIST. Highlights trailing spaces at the end of the line, and can remove them if configured to do so on save. Manage projects directly from the command palette. The following extensions are not specific to Python, but add some great features to VS Code. MagicPython improves the highlighting for Python 3 (in particular 3.5) syntax features including type annotations, string formatting, and regular expressions. This can then be set either via the status bar, or the command palette with Change Language Mode. This extension adds support for the Jinja2 template language support to VS Code. Unit testing (unittests and nosetests, with config files).Debugging with custom environment variables.Debugging with support for shebang (windows).Debugging remote processes (attaching to local and remote process).
Debugging Multiple threads (Web Applications - Flask, etc) and expanding values (on Windows and Mac).Debugging with support for local variables, arguments, expressions, watch window, stack information, break points.View signature and similar by hovering over a function or method.Renaming, Viewing references, Going to definitions, Go to Symbols.Code formatting (autopep8, yapf, with config files).Linting (PyLint, Pep8, Flake8 with config files and plugins).This is the go to extension for all things Python related. Extensions are all installed simply by bringing up the command palette ( cmd + shift + p) and typing ext install. Today we'll be looking at how we can optimise the editor with a number of different extensions (or plugins if you're coming from Sublime) that will make writing Python a more enjoyable experience. Visual Studio Code reached it's version 1.0 milestone not long ago, and is starting to prove itself to be quite a powerful replacement for either Sublime Text or Atom, particularly for Python development. That was until a new challenger appeared. Still, the interface was extremely slick, and the theme support was great, so I persevered with it. Responsiveness became an issue the larger the project became (particularly from an autocomplete standpoint), and numerous other niggles. The debugging package that was suggested stopped working randomly. I've been a massive fan of Sublime Text for years now, and although I switched across to Atom earlier this year for a bit of a trial, there were a lot of things I just missed from my setup in Sublime. When writing code, everyone has a preference for their favourite editor of choice.