April 23rd, 2019

Python in Visual Studio Code – April 2019 Release

Luciana Abud
Program Manager

We are pleased to announce that the April 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 made a series of improvements that are listed in our changelog, closing a total of 84 issues including:

  • Variable Explorer and Data Viewer
  • Enhancements to debug configuration
  • Additional improvements to the Python Language Server

Keep on reading to learn more!  

Variable Explorer and Data Viewer

The Python Interactive experience now comes with a built-in variable explorer along with a data viewer, a highly requested feature from our users. Now you can easily view, inspect and filter the variables in your application, including lists, NumPy arrays, pandas data frames, and more! 

A variables section will now be shown when running code and cells in the Python Interactive window. Once you expand it, you’ll see the list of the variables in the current Jupyter session. More variables will show up automatically as they get used in the code. Clicking on each column header will sort the variables in the table. 

You can also double-click on each row or use the “Show variable in data viewer button to view full data of each variable in the newly-added Data Viewer, as well as perform simple search over its values: 

The Data Viewer requires pandas package 0.20 or later, and you will get a message to install or upgrade if it’s not available.    

The Variable Explore is enabled by default. You can turn it off through File > Preferences > Settings and looking for the Python > Data Science: Show Jupyter Variable Explorer setting.

Enhancements to debug configuration 

We simplified the process of configuring the debugger for your workspace. When you start debugging (through the Debug Panel, F5 or Debug > Start Debugging) and no debug configuration exists, you now will be prompted to create a debug configuration for your application. Creating a debug configuration is accomplished through a set of menus, instead of manually configuring the launch.json file 

This prompt will also be displayed when adding another debug configuration through the launch.json file:

Additional improvements to the Python Language Server 

This release includes several fixes and improvements to the Python Language Server. We added back features that were removed in the 0.2 release: “Rename Symbol”, “Go to Definition” and “Find All References, and made improvements to loading time and memory usage when importing scientific libraries such as pandas, Plotly, PyQt5 , especially when running in full Anaconda environments.  

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 the next few releases, so if you run into problems, please file an issue on the Python Language Server GitHub page.  

Other Changes and Enhancements 

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include: 

  • Change default behavior of debugger to display return values. (#3754) 
  • Change “Unit Test” phrasing to “Test” or “Testing”. (#4384) 
  • Replace setting debugStdLib with justMyCode. (#4032) 
  • Add setting to just enable/disable the data science codelens. (#5211) 
  • Improved reliability of test discovery when using pytest. (#4795) 
  • Updates to README file. 

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems, please file an issue on the Python VS Code GitHub page. 

 

 

 

Author

Luciana Abud
Program Manager

Product Manager at Microsoft for Python in Visual Studio Code

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • pragun sharma

    Please add the option to delete the variable in the variable explorer. It is already present is some of the other IDEs like Spyder. Also, it would be really helpful if you can add the ability to change the commands in Python Interactive windows even when they are executed. Shortcuts to add a cell below and above , execute one line are also not there.