Python in Visual Studio Code Gets a Start Page
Among the improvements to Python functionality in the open source, cross-platform Visual Studio Code editor is a new start page.
That functionality comes with the Python extension in the VS Code marketplace, which is by far the most popular extension. It's nearing 21 million installations, earning an average 4.4 rating (scale to 5) from 324 developers who reviewed it. The second-most-popular item, C/C++, is at about 12.2 million installations.
Now, that functionality and related information will be easier to see on the new start page.
"The start page brings all the most common actions for the Python extension to an easily accessible page," said Microsoft's Jeffrey Mew in a June 17 blog post. "It will highlight our monthly release notes so you can keep up to date about all our latest features, changes and tutorials (for example our tutorial for data science), and showcase features in our sample notebook."
For now, the start page can be accessed with the "Open Start Page" command from the command palette, though in the future it will appear automatically for developers who download the Python extension or when the tool is updated.
Mew also highlighted experimental run-by-line support, described as a simplified way for troubleshooting issues in Notebook cells. An integral part of the Python coding experience, Notebooks, produced by the popular Jupyter Notebook App, are documents containing both computer code (for example, python) and rich text elements such as paragraph, equations, figures, links, and so on.
"To help diagnose your Notebook code, run-by-line lets you step through the code in your cells in line-by-line fashion and view the state of your variables at each step via the variable explorer or data tips (hovering your mouse over the variable)," Mew said.
"To start a session, click the run-by-line icon to the right of the run-cell icon in the cell. Once in a run-by-line session, you can run the currently highlighted line of code by pressing the same icon again. To exit, click the stop button next to the run-by-line icon in the cell."
Microsoft for years has been steadily improving Notebook functionality in the VS Code Python experience as part of going "all in" on Python in the code editor, as detailed in these articles:
Other notable changes and enhancements highlighted by Mew in the June 2020 update to Python in VS Code include:
- Removed python.jediEnabled setting in favor of python.languageServer. (#7010)
- Preliminary support using other languages for the Jupyter kernel. (#11919)
- Ensure sorting imports in a modified file picks up the proper configuration. (thanks Peter Law!) (#4891)
- Made the variable explorer resizable. (#5283)
- Fixed issue with formatting when the first line is blank. (#11416)
Development of the Python extension for VS Code is done on GitHub.
About the Author
David Ramel is an editor and writer for Converge360.