Visual Studio Code中的Python – 2019年4月发布

We are pleased to announce that the April 2019 release of the Python Extension for Visual Studio Code is now available. 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.

我们很高兴地宣布,适用于Visual Studio Code的Python扩展的2019年4月版现已可用。 您可以从市场上下载Python扩展 ,也可以直接从Visual Studio Code中的扩展库安装它。 您可以在文档中了解有关Visual Studio CodePython支持的更多信息。

In this release we made a series of improvements that are listed in our changelog, closing a total of 84 issues including:

在此版本中,我们进行了一系列改进,这些改进已在变更日志中列出,共解决了84个问题,其中包括:

  • Variable Explorer and Data Viewer

    变量浏览器和数据查看器
  • Enhancements to debug configuration

    调试配置增强
  • Additional improvements to the Python Language Server

    Python语言服务器的其他改进

Keep on reading to learn more!  

继续阅读以了解更多信息!

变量浏览器和数据查看器 (Variable Explorer and Data Viewer)

The Python Interactive experience now comes with a built-in variable explorer along with a data viewer, a highly requested feature from our users. Now you can easily view, inspect and filter the variables in your application, including lists, NumPy arrays, pandas data frames, and more! 

现在,Python交互式体验带有内置的变量资源管理器以及数据查看器,这是用户强烈要求的功能。 现在,您可以轻松地查看,检查和过滤应用程序中的变量,包括列表,NumPy数组,pandas数据框等等!

A variables section will now be shown when running code and cells in the Python Interactive window. Once you expand it, you’ll see the list of the variables in the current Jupyter session. More variables will show up automatically as they get used in the code. Clicking on each column header will sort the variables in the table. 

在“ Python交互式”窗口中运行代码和单元格时,现在将显示一个变量部分。 展开后,您将在当前的Jupyter会话中看到变量列表。 在代码中使用它们时,更多变量将自动显示。 单击每个列标题将对表中的变量进行排序。

You can also double-click on each row or use the “Show variable in data viewer” button to view full data of each variable in the newly-added Data Viewer, as well as perform simple search over its values: 

您还可以双击每一行,或使用“在数据查看器中显示变量”按钮在新添加的数据查看器中查看每个变量的完整数据,以及对其值进行简单搜索:

The Data Viewer requires pandas package 0.20 or later, and you will get a message to install or upgrade if it’s not available.    

数据查看器需要0.20或更高版本的pandas软件包,如果没有可用的安装或升级信息,您将收到一条消息。

The Variable Explore is enabled by default. You can turn it off through File > Preferences > Settings and looking for the Python > Data Science: Show Jupyter Variable Explorer setting.

默认情况下启用变量浏览。 您可以通过“文件”>“首选项”>“设置”,然后在“ Python”>“数据科学:显示Jupyter Variable Explorer”设置中将其关闭。

调试配置增强 (Enhancements to debug configuration )

We simplified the process of configuring the debugger for your workspace. When you start debugging (through the Debug Panel, F5 or Debug > Start Debugging) and no debug configuration exists, you now will be prompted to create a debug configuration for your application. Creating a debug configuration is accomplished through a set of menus, instead of manually configuring the launch.json file.  

我们简化了为您的工作区配置调试器的过程。 当您开始调试时(通过Debug Panel, F5Debug> Start D ebugging ),并且不存在任何调试配置,现在将提示您为应用程序创建调试配置。 创建调试配置是通过一组菜单完成的,而不是手动配置launch.json文件。

This prompt will also be displayed when adding another debug configuration through the launch.json file:

通过launch.json文件添加另一个调试配置时,也会显示此提示:

Python语言服务器的其他改进 (Additional improvements to the Python Language Server )

This release includes several fixes and improvements to the Python Language Server. We added back features that were removed in the 0.2 release: “Rename Symbol”, “Go to Definition” and “Find All References”, and made improvements to loading time and memory usage when importing scientific libraries such as pandas, Plotly, PyQt5 , especially when running in full Anaconda environments.  

此版本包括对Python语言服务器的一些修复和改进。 我们增加了0.2版中已删除的功能:“重命名符号”,“转到定义”和“查找所有引用”,并在导入科学图书馆(如熊猫,Plotly,PyQt5,特别是在完整​​的Anaconda环境中运行时。

To opt-in to the Language Server, change the python.jediEnabled setting to false in File > Preferences > User Settings.  We are working towards making the language server the default in the next few releases, so if you run into problems, please file an issue on the Python Language Server GitHubpage.  

要选择加入语言服务器,请在File> Preferences> User Settings中将python.jediEnabled设置更改为false 。 我们正在努力在接下来的几个版本中将语言服务器设置为默认语言,因此,如果遇到问题,请在Python Language Server GitHub页面上提出问题。

其他变更和增强 (Other Changes and Enhancements )

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: 

我们还添加了一些小的增强功能,并解决了用户要求的问题,这些问题应改善您在Visual Studio Code中使用Python的体验。 一些值得注意的变化包括:

  • Change default behavior of debugger to display return values. (#3754

    更改调试器的默认行为以显示返回值。 ( #3754 )

  • Change “Unit Test” phrasing to “Test” or “Testing”. (#4384

    将“单元测试”短语更改为“测试”或“测试”。 ( #4384 )

  • Replace setting debugStdLib with justMyCode. (#4032

    用justMyCode替换设置debugStdLib。 ( #4032 )

  • Add setting to just enable/disable the data science codelens. (#5211

    添加设置以仅启用/禁用数据科学编码。 ( #5211 )

  • Improved reliability of test discovery when using pytest. (#4795

    使用pytest时提高了测试发现的可靠性。 ( #4795 )

  • Updates to README file. 

    更新为README文件。

Avatar

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems, please file an issue on the Python VS Code GitHub page.  

请确保立即下载适用于Visual Studio Code 的Python扩展 ,以尝试上述改进。 如果遇到任何问题,请在Python VS Code GitHub页面上提交问题。

卢西亚娜·德·梅洛·阿布 (Luciana de Melo e Abud)

Program Manager, Python extension in Visual Studio Code

程序管理器,Visual Studio Code中的Python扩展

翻译自: https://habr.com/en/company/microsoft/blog/450708/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值