How to Building a Visual Studio Code Extension?

Python in Visual Studio Code

Python in Visual Studio Code

Python in Visual Studio Code

This post was written by Luciana Abud, Program Manager for the Python Extension in Visual Studio Code

We are pleased to announce that the January 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

In this release we have closed a total of 62 issues, including:

  • IPython console support in the Python Interactive window
  • Support for running an entire file in the Python Interactive window
  • Problems for failed tests when using pytest (thanks Chris NeJame)
  • Much faster outline when using the Python Language Server

Keep on reading to learn more!

IPython console support in the Python Interactive window

The data science experience was first introduced in the last October release, and one of the top feedback requests we’ve heard was to provide the ability to iterate rapidly by experimenting with code in an interactive console environment. In this update, we extended the Python Interactive window with IPython console support by allowing code to be typed in and executed directly in the window. You can now use the enhanced Interactive window standalone as an IPython console, or send code from the editor for execution.

Here’s how to use it in a nutshell:

  • IPython console support in the Python Interactive window
  • Support for running an entire file in the Python Interactive window
  • Problems for failed tests when using pytest (thanks Chris NeJame)
  • Much faster outline when using the Python Language Server

Run an entire file in the Python Interactive window without cells defined

Being able to run code in the Python Interactive window without having to define cells is no doubt one of the most requested features. This update enables running the entire files in the Interactive window without cell definitions.

To run the entire file, simply use the command Run Current File in Python Interactive window in the Command Palette. Your code will be executed with results displayed in the Python Interactive window.

We’ve also heard requests to run the current code selection / line in the editor, and this will be coming next in a future update.

Diagnostics for failed tests with pytest

This release also includes an enhancement to unit tests run with pytest: you can now see failed tests in the problems window. You can also double click lines to navigate to the failed test method and the exact failing line. The correspondent line in the editor will be selected, allowing you to easily identify and edit it.

As before, you can also see failed tests highlighted with pass/fail icons in the editor. You can hover these icons to see the errors navigate to the failing test method/line, just like in the problems window.

We’d like to thank community contributor Chris NeJame for implementing this new feature. Contributions to the Python extension are always welcome! If you’re interested, check our contributing guide to learn more.

Much faster outline view with the Python Language Server

We also made improvements to the outline view when using the Microsoft Python Language Server. The Outline view could often take a long time to load or even time out, and now with the Language Server It now loads consistently fast, and cases where symbols would appear duplicated were fixed.

As a reminder, the Language Server was released as a preview the last July release of the Python extension. To opt-in to the language server, change the python.jediEnabled setting to false in File > Preferences > User Settings. We are working towards making the language server the default in future releases.

Original source: https://blogs.msdn.microsoft.com

 ===================================================================

Thanks for reading :heart: If you liked this post, share it with all of your programming buddies! Follow me on Facebook | Twitter

Learn More

☞ Complete Python Bootcamp: Go from zero to hero in Python 3

☞ Python for Time Series Data Analysis

☞ The complete beginner’s guide to JSON

☞ The Complete Guide to JSON Web Tokens

☞ Python Programming For Beginners From Scratch

☞ Python Network Programming | Network Apps & Hacking Tools

☞ Intro To SQLite Databases for Python Programming

☞ Ethical Hacking With Python, JavaScript and Kali Linux

☞ Beginner’s guide on Python: Learn python from scratch! (New)

☞ Python for Beginners: Complete Python Programming

Coding F# in Visual Studio Code with Ionide

Coding F# in Visual Studio Code with Ionide

In this post, Phillip Carter sits down with Cecil is talk about the Ionide extension for Visual Studio Code. Ionide tons of of great features for F# developers working in Visual Studio code such as autocomplete, packet integration, syntax highlighting and much more.

Ionide plugin for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp&wt.mc

F# Guide
https://docs.microsoft.com/en-us/dotnet/fsharp?wt.mc

Visual Studio Code
https://code.visualstudio.com?wt.mc

In this episode, Phillip Carter sits down with Cecil is talk about the Ionide extension for Visual Studio Code. Ionide tons of of great features for F# developers working in Visual Studio code such as autocomplete, packet integration, syntax highlighting and much more.

[00:55] - Introducing Ionide

[03:11] - Getting started with Ionide

[04:16] - F# scripting

[10:25] - Working with F# projects

[12:50] - The F# Info Panel

[18:42] - Recapping BenchmarkDotNet with F#

[22:07] - Contributing to Ionide