{"id":8245,"date":"2021-02-17T16:33:47","date_gmt":"2021-02-18T00:33:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=8245"},"modified":"2021-02-17T16:33:47","modified_gmt":"2021-02-18T00:33:47","slug":"python-in-visual-studio-code-february-2021-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-february-2021-release\/","title":{"rendered":"Python in Visual Studio Code \u2013 February 2021 Release"},"content":{"rendered":"<p>We are pleased to announce that the February 2021 release of the Python Extension for Visual Studio Code is now available. You can\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">download the Python extension<\/a> from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/python-tutorial\">Python support in Visual Studio Code<\/a>\u00a0in the documentation.<\/p>\n<p>This release includes TensorBoard integration, and improvements on docstring readability and code navigation with Pylance. If you\u2019re interested, you can check the full list of improvements in our <a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/blob\/master\/CHANGELOG.md\">changelog<\/a>.<\/p>\n<h2>Python Extension Updates<\/h2>\n<h2>TensorBoard Integration<\/h2>\n<p>We\u2019re excited to launch TensorBoard integration within VS Code. <a href=\"https:\/\/www.tensorflow.org\/tensorboard\">TensorBoard<\/a> is a data science companion dashboard that helps PyTorch and TensorFlow developers visualize their dataset and model training. With TensorBoard directly integrated in VS Code, you can spot check your models\u2019 predictions, view the architecture of your model, analyze you model\u2019s loss and accuracy over time, profile your code to find out where it\u2019s the slowest, and much more!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8255\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard.png\" alt=\"TensorBoard open on a webview in VS Code. \" width=\"2555\" height=\"1381\" srcset=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard.png 2555w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard-300x162.png 300w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard-1024x553.png 1024w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard-768x415.png 768w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard-1536x830.png 1536w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb21-Tensorboard-2048x1107.png 2048w\" sizes=\"(max-width: 2555px) 100vw, 2555px\" \/><\/a><\/p>\n<p>To start a TensorBoard session, open the command palette (Ctrl\/Cmd + Shift + P) and search for the command \u201cPython: Launch TensorBoard\u201d. Afterwards, you will be prompted to select the folder where your TensorBoard log files are located. By default, we will use your current working directory and automatically detect your TensorBoard log files within any subdirectories, but you can also specify your own directory. VS Code will then open a new tab with TensorBoard and its lifecycle will be managed by VS Code as well.<\/p>\n<h2>Pylance Extension Updates<\/h2>\n<h2><span style=\"font-size: 20.0pt; line-height: 107%;\">Improved docstring readability<\/span><\/h2>\n<p>We\u2019re excited to announce huge improvements to the readability and formatting of docstrings in Pylance. You can now more easily read docstrings with indented regions (such as parameter blocks in numpy and pandas docs), nested lists (such as those in argparse) and modules that use epydoc formatting (such as OpenCV).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb2021-PylanceDocstringEnhancement.gif\">\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-8248\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb2021-PylanceDocstringEnhancement.gif\" alt=\"Improved docstring readability with Pylance in VS Code.\" width=\"1400\" height=\"700\" \/><\/a><\/p>\n<h2>Improved go to definition and go to declaration behavior<\/h2>\n<p>We&#8217;ve also made improvements to code navigation to streamline go to definition and go to declaration behavior and bring you right to where you want to go. Now instead of being presented with a window to choose between the type stub (.pyi) or source file (e.g. .py files) when both are available, go to definition will bring you to the source file, and go to declaration will bring you to the type stub. If either of these calls would otherwise return no results (e.g. go to definition when only a type stub is available), then Pylance will bring you to whichever file is available so that you are still provided with some information about the symbol of interest.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb2021-PylanceCodeNavUpdate.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8249\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2021\/02\/Feb2021-PylanceCodeNavUpdate.gif\" alt=\"Functionality of go to declaration and go to definition with Pylance in VS Code. \" width=\"900\" height=\"450\" \/><\/a><\/p>\n<h2>Other Changes and Enhancements<\/h2>\n<p>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:<\/p>\n<ul>\n<li>Raised the minimum required VS Code version to 1.51. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/15237\">#15237<\/a>)<\/li>\n<li>Refactored the Enable Linting command to provide the user with a choice of &#8220;Enable&#8221; or &#8220;Disable&#8221; linting to make it more intuitive. (thanks <a href=\"https:\/\/github.com\/henryboisdequin\">henryboisdequin<\/a>!) (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/8800\">#8800<\/a>)<\/li>\n<li>The \u201cPylance: Report Issue\u201d command automatically fills out a new GitHub template for simpler language server bug reporting (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/762\">pylance-release #762<\/a>)<\/li>\n<\/ul>\n<p>Be sure to\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">download the Python extension<\/a>\u00a0for Visual Studio Code now to try out the above improvements. If you run into any problems or have suggestions, <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/new\/choose\">please file an issue<\/a> on the\u00a0<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\">Python VS Code GitHub<\/a>\u00a0page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce that the February 2021 release of the Python Extension for Visual Studio Code is now available. This release includes TensorBoard integration, and improvements on docstring readability and code navigation with Pylance. Keep reading to learn more!<\/p>\n","protected":false},"author":8347,"featured_media":8255,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-8245","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>We are happy to announce that the February 2021 release of the Python Extension for Visual Studio Code is now available. This release includes TensorBoard integration, and improvements on docstring readability and code navigation with Pylance. Keep reading to learn more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/users\/8347"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=8245"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8245\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/8255"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=8245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=8245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=8245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}