Python in Visual Studio Code. April issue

Original author: Luciana de Melo e Abud
  • Transfer
We are pleased to announce that in April 2019, the Python extension update for Visual Studio Code was released. 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 issue, we made a number of improvements, listed in our change log , closing a total of 84 issues, including:

  • Variable Explorer and Data Viewer
  • Debug configuration enhancements
  • Additional improvements in Python Language Server

Look under the cat to find out more!


Variable Explorer and Data Viewer

Python Interactive now comes with a built-in Variable Explorer and Data Viewer (a highly sought-after feature for our users). Now you can easily view, check and filter variables in the application, including lists, NumPy arrays, Pandas data frames and much more!

The Variables section will now display when code and cells are run in the Python Interactive Window. Once you expand it, you will see a list of variables in the current Jupyter session. Additional variables will be displayed automatically as they are used in the code. Clicking on the header of each column 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 the full data of each variable in the newly added Data Viewer, as well as perform a simple search by its values:


Data Viewer requires Pandas package version 0.20 or more late. If it is not available, you will receive a message to install or update it.

Variable Explore is enabled by default. You can disable it via File> Preferences> Settings and search Python> Data Science: Show Jupyter Variable Explorer .

Debug configuration enhancements

We simplified the debugger configuration process for the workspace. Now, if when you start debugging (via Debug Panel, F5 or Debug> Start Debugging ) it appears that the debugging configuration does not exist, you will be asked to create a debugging configuration for your application. Creating a debug configuration can be done using a menu set, 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 in Python Language Server

This release includes several fixes and improvements for the Python Language Server. We returned the features that were removed in release 0.2: “Rename Symbol”, “Go to Definition” and “Find All References”, and also made improvements to the load time and memory usage when importing scientific libraries such as Pandas, Plotly, PyQt5 , especially when working in a full Anaconda environment.

To enable the Language Server, change in python.jediEnabled value false in the File> the Preferences> the User the Settings . We are working to make the default language server in the next few releases, so if you run into problems, please post a question on the Python Language Server page on GitHub .

Other changes and improvements.

We also added minor improvements and bug fixes requested by users, which should improve your experience with Python in Visual Studio Code. Some notable changes include:

  • Change the default debugger behavior to display return values. ( # 3754 )
  • Change the wording of “Unit Test” to “Test” or “Testing”. ( # 4384 )
  • Replacing the debugStdLib parameter with justMyCode. ( # 4032 )
  • Added option to simply enable / disable data science codelens. ( # 5211 )
  • Improving the reliability of test detection using pytest. ( # 4795 )
  • Updating the README file .

Remember to download the Python extension for Visual Studio Code now to try out the above improvements. If you have any problems, please write about it on the Python VS Code page on GitHub .

Also popular now: