Visual Studio's Python IntelliSense Goes Standalone, Previews in VS Code Extension

Microsoft is converting the baked-in Python IntelliSense support in Visual Studio into an open source standalone product and previewing it in the new update to the VS Code Python extension.

Visual Studio's IntelliSense code analysis and code completion suggestions have worked with Python since the language's infusion into the IDE in 2011. Now the company has leveraged its Language Server Protocol to make that Python goodness portable in the form of the Python Language Server.

"It is available first today in the July release of the Python Extension for Visual Studio Code, and we will later release it as a standalone component that you can use with any tool that works with the Language Server Protocol," Microsoft's Steve Dower said in a post yesterday.

The Language Server Protocol defines the protocol used between a code editor or IDE and a language server that provides language features like auto complete, go to definition, find all references and so on. Through it, functionality like IntelliSense that was previously provided by complicated static analysis closely tied to specific editors or IDEs is made portable, offered up by a server rather than the editor/IDE. Thus editors/IDEs that support the protocol can get IntelliSense for any programming language it works with.

"Previously, Python IntelliSense in Visual Studio was very specific to that IDE," Dower explained. "We have been developing this support for nearly a decade. It has an impressively deep understanding of the Python language, but only Visual Studio users have been able to enjoy this work. Recently we have been refactoring our implementation to separate it from Visual Studio and make it available as a standalone program using the Language Server Protocol.

"The end result is that we have a black box that takes Python code and provides all the information your editor needs for tooltips, completions, finding definitions and references, global variable renaming and more."

As a preview available in the latest update to the VS Code Python extension, Microsoft yesterday said it provides the following benefits (already available or soon coming in Visual Studio) to VS Code developers:

  • Syntax errors as you type in code
  • Warnings when modules are not found
  • Using Typeshed files to fill in missing completions for modules
  • Improved performance for analyzing your workspace and presenting completions
  • Ability to detect syntax errors on your entire workspace, rather than just the current file
  • Faster startup times
  • Faster imports
  • Better handling for a number of language constructs

Those details were provided in a post announcing the June/July releases of the VS Code Python extension. Microsoft's Brett Cannon also announced the team has closed 156 issues in the new releases, which also incorporate gevent launch configuration for debugging.

"Contributed by Bence Nagy at the PyCon US 2018 sprints, the experimental debugger now supports a gevent launch configuration for code that has been monkey-patched by gevent," Cannon said. "A predefined debugging template named 'Python Experimental: Gevent' is available, as well as adding the setting "gevent": true to any launch configuration."

The Python extension is the most popular offering in the Visual Studio Code Marketplace. It boasts more than 13.9 million installs and has earned a 4.6 (out of 5 max) from 182 developers who reviewed it.

Dower said by making Visual Studio's Python IntelliSense portable and cross-platform, the team can improve it for both Visual Studio and VS Code at the same time. The standalone release of the Python Language Server is expected in the next few months, he said, and will be available under the Apache 2.0 license.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • Color Shards

    Sharing Data and Splitting Components in Blazor

    ASP.NET Core Version 3.1 has at least two major changes that you'll want to take advantage of. Well, Peter thinks you will. Depending on your background, your response to one of them may be a resounding “meh.”

  • How to Create a Machine Learning Decision Tree Classifier Using C#

    After earlier explaining how to compute disorder and split data in his exploration of machine learning decision tree classifiers, resident data scientist Dr. James McCaffrey of Microsoft Research now shows how to use the splitting and disorder code to create a working decision tree classifier.

  • Microsoft: Move from Traditional ASP.NET to 'Core' Requires 'Heavy Lifting'

    There are plenty of reasons to move traditional ASP.NET web apps -- part of the old .NET Framework -- to the new cross-platform direction, ASP.NET Core, but beware it will require some "heavy lifting," Microsoft says.

  • Purple Blue Nebula Graphic

    How to Compute Disorder for Machine Learning Decision Trees Using C#

    Using a decision tree classifier from a machine learning library is often awkward because it usually must be customized and library decision trees have many complex supporting functions, says resident data scientist Dr. James McCaffrey, so when he needs a decision tree classifier, he always creates one from scratch. Here's how.

  • Blazor's Future: gRPC Is Key

    Blazor guru Steve Sanderson detailed what Microsoft is thinking about the future of the revolutionary project that enables .NET-based web development using C# instead of JavaScript, explaining how gRPC is key, along with a new way of testing and a scheme for installable desktop apps.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events