News

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."

The New Start Page
[Click on image for larger view.] The New Start Page (source: Microsoft).

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.

Run-by-Line in Animated Action
[Click on image for larger, animated GIF view.] Run-by-Line in Animated Action (source: Microsoft).

"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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube