{"id":9544,"date":"2023-12-07T13:02:51","date_gmt":"2023-12-07T21:02:51","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=9544"},"modified":"2023-12-07T13:02:51","modified_gmt":"2023-12-07T21:02:51","slug":"python-in-visual-studio-code-december-2023-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-december-2023-release\/","title":{"rendered":"Python in Visual Studio Code &#8211; December 2023 Release"},"content":{"rendered":"<p>We\u2019re excited to announce the December 2023 release of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">Python<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-toolsai.jupyter\">Jupyter<\/a> extensions for Visual Studio Code!<\/p>\n<p>This release includes the following announcements:<\/p>\n<ul>\n<li>Configurable debugging options added to Run button menu<\/li>\n<li>Show Type Hierarchy with Pylance<\/li>\n<li>Deactivate command support for automatically activated virtual environments in the terminal<\/li>\n<li>Setting to turn REPL Smart Send on\/off and a message when it is unsupported<\/li>\n<\/ul>\n<p>If you\u2019re interested, you can check the full list of improvements in our changelogs for the <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/releases\">Python<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/blob\/main\/CHANGELOG.md\">Jupyter<\/a> and <a href=\"https:\/\/github.com\/microsoft\/pylance-release\/blob\/main\/CHANGELOG.md\">Pylance<\/a> extensions.<\/p>\n<h2>Configurable debugging options added to Run button menu<\/h2>\n<p>The <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.debugpy\">Python Debugger<\/a> extension now has configurable debug options under the Run button menu. When you select <strong>Python Debugger: Debug using launch.json<\/strong> and there is an existing <code>launch.json<\/code> in your workspace, it shows all available debug configurations you can pick to start the debugger. In the case you do not have an existing <code>launch.json<\/code>, you will be prompted to select a debug configuration template to create a <code>launch.json<\/code> file for your Python application, and then can run your application using this configuration.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/run-button-debug-config.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9545\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/run-button-debug-config.gif\" alt=\"Gif demonstrating configurable debug options in the Run button menu.\" width=\"2489\" height=\"1589\" \/><\/a><\/p>\n<h2>Show Type Hierarchy with Pylance<\/h2>\n<p>You can now more conveniently explore and navigate through your Python projects&#8217; types relationships when using <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.vscode-pylance\">Pylance<\/a>. This can be helpful when working with large codebases with complex type relationships.<\/p>\n<p>When you right-click on a symbol, you can select <strong>Show Type Hierarchy<\/strong> to open the type hierarchy view. From there you can navigate through the symbol&#8217;s subtypes as well as super-types.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/pylance-show-type-hierarchy.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9549\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/pylance-show-type-hierarchy.gif\" alt=\"GIF demonstrating Pylance Show Type Hierarchy on Python project.\" width=\"3036\" height=\"1858\" \/><\/a><\/p>\n<h2>Deactivate command support for automatically activated virtual environments in the terminal<\/h2>\n<p>The Python extension has a new activation mechanism that activates the selected environment in your default terminal without running any explicit activation commands. This is currently behind an experimental flag and can be enabled through the following <strong>User<\/strong> setting: <code>\"python.experiments.optInto\": [\"pythonTerminalEnvVarActivation\"]<\/code> as mentioned in our <a href=\"https:\/\/code.visualstudio.com\/updates\/v1_82#_terminal-activation-using-environment-variables\">August 2023 release notes<\/a>.<\/p>\n<p>However, one problem with this activation mechanism is that it didn&#8217;t support the <code>deactivate<\/code> command because there is no inherent activation script. We received feedback that this is an important part of some users&#8217; workflow, so we have added support for <code>deactivate<\/code> when the selected default terminal is PowerShell or Command Prompt. We plan to add support for additional terminals in the future.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/deactivate-command.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9546\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/deactivate-command.gif\" alt=\"Gif demonstrating auto-activation of a Powershell terminal and using the deactivate command.\" width=\"2489\" height=\"1589\" \/><\/a><\/p>\n<h2>Setting to turn REPL Smart Send on\/off and a message when it is unsupported<\/h2>\n<p>When attempting to use Smart Send via <code>kbstyle(Shift+Enter)<\/code> on a Python file that contains unsupported Python code (e.g., Python 2 source code), there is now a warning message and a setting to deactivate REPL Smart Send. Users are also able to change their user and workspace specific behavior for REPL Smart Send via the <code>python.REPL.enableREPLSmartSend<\/code> setting.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9547\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting.png\" alt=\"Screenshot of REPL Smart Send setting.\" width=\"1652\" height=\"210\" srcset=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting.png 1652w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting-300x38.png 300w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting-1024x130.png 1024w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting-768x98.png 768w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/12\/repl-smart-send-setting-1536x195.png 1536w\" sizes=\"(max-width: 1652px) 100vw, 1652px\" \/><\/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 and Jupyter Notebooks in Visual Studio Code. Some notable changes include:<\/p>\n<ul>\n<li>The Pylance extension has adjusted its release cadence to monthly stable releases and nightly pre-release builds, similar to the Python extension release cadence. These changes will allow for more extensive testing on stable builds and a more reliable user experience.<\/li>\n<li>String inputs for numerical values are now supported in attach debug configurations with the Python Debugger extension <a href=\"https:\/\/github.com\/microsoft\/vscode-python-debugger\/issues\/115\">(@vscode-python-debugger#115)<\/a>.<\/li>\n<li>The Python <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-june-2023-release\/#test-discovery-and-execution-rewrite\">test adapter rewrite experiment<\/a> has been rolled out to 100% of users. For the time being, you can opt-out by adding <code>\"python.experiments.optOutFrom\" : \"pythonTestAdapter\"<\/code> in your <code>settings.json<\/code>, but we will soon drop this experimental flag and adopt this new architecture.<\/li>\n<\/ul>\n<p>We would also like to extend special thanks to this month\u2019s contributors:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/zyxue\">@zyxue<\/a> Make version extraction more robust in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/306\">vscode-black-formatter#306<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/loskutov\">@loskutov<\/a> Fixed mis-escaped string literal in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/312\">vscode-black-formatter#312<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/bhagya-98\">@bhagya-98<\/a> Improve setting description for default interpreter setting in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/324\">vscode-black-formatter#324<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Kelly-LC\">@Kelly-LC<\/a> Remove Python 3.7 from test actions in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/322\">vscode-black-formatter#322<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/aarushinair\">@aarushinair<\/a> Update dependency packages in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/326\">vscode-black-formatter#326<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mvasilkov\">@mvasilkov<\/a> Fixed typo in README.md in <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/358\">vscode-black-formatter#358<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/kirankumarmanku\">@kirankumarmanku<\/a> Added workaround and early returning if file name matched excluded arg in <a href=\"https:\/\/github.com\/microsoft\/vscode-autopep8\/pull\/142\">vscode-autopep8#142<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/norasoliman\">@norasoliman<\/a> Remove Python 3.7 from test actions in <a href=\"https:\/\/github.com\/microsoft\/vscode-autopep8\/pull\/165\">vscode-autopep8#165<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/wuyumin\">@wuyumin<\/a> Fix config file setting in README.md in <a href=\"https:\/\/github.com\/microsoft\/vscode-autopep8\/pull\/156\">vscode-autopep8#156<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/vinitaparasrampuria\">@vinitaparasrampuria<\/a> Capitalize Python in README.md and settings description in <a href=\"https:\/\/github.com\/microsoft\/vscode-autopep8\/pull\/167\">vscode-autopep8#167<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/JamzumSum\">@JamzumSum<\/a> Improved shell identifier on case-insensitive system in <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/22391\">vscode-python#22391<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/trysten\">@trysten<\/a> Add consoleTitle to launch.json properties schema in <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/22406\">vscode-python#22406<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/shanesaravia\">@shanesaravia<\/a> Resolve test suite discovery import errors due to path ordering\u00a0in <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/22454\">vscode-python#22454<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/johnhany97\" target=\"_blank\" rel=\"noopener\">@johnhany97<\/a> Pass along Python interpreter to jedi-language-server in <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/22466\">vscode-python#22466<\/a><\/li>\n<\/ul>\n<p>Try out these new improvements by downloading the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">Python extension<\/a> and the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-toolsai.jupyter\">Jupyter extension<\/a> from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or \u2318 + \u21e7 + X). You can learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/python-tutorial\">Python support in Visual Studio Code<\/a> in the documentation. 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 <a href=\"https:\/\/github.com\/Microsoft\/vscode-python\">Python VS Code GitHub page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The December 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This month&#8217;s updates include debug configurations add to the Run button menu, show type hierarchy with Pylance, deactivate support for auto-activated terminals, and additional REPL improvements. Keep reading to learn more!<\/p>\n","protected":false},"author":99209,"featured_media":10119,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,6],"tags":[17,1261],"class_list":["post-9544","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-visual-studio-code","tag-python","tag-release"],"acf":[],"blog_post_summary":"<p>The December 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This month&#8217;s updates include debug configurations add to the Run button menu, show type hierarchy with Pylance, deactivate support for auto-activated terminals, and additional REPL improvements. Keep reading to learn more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9544","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\/99209"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=9544"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9544\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/10119"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=9544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=9544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=9544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}