Pycharm(一个 Python IDE)只能显示列表的前 300 个成员 [英] Pycharm (a Python IDE) can only show the first 300 members of a list

查看:69
本文介绍了Pycharm(一个 Python IDE)只能显示列表的前 300 个成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用超过 300 个元素填充列表时,我用来读取 Python(即 Pycharm)的工作环境将只显示前 300 个元素.这适用于社区版和专业版.有没有人知道如何解决这个问题,如果没有,有没有人知道可以显示列表中所有元素的 IDE,即使该列表有 10,000 个元素?

When I populate a list with more than 300 elements the working environment I'm using to read Python which is Pycharm will only show the first 300 elements. This applies to both the community editions and the professional edition. Does anyone know how to fix this and if not does anyone know of an IDE which can display all the elements of a list, even if that list has 10,000 elements?

再次强调,出于调试目的,我需要能够查看列表的元素.

Again I want to emphasize that for debugging purposes I need to be able to view the elements of a list.

这说明300多个元素无法查看

这显示了相关列表的长度.

推荐答案

是的,可以使用 pycharm 显示更多项目.

Yes, it's possible to show more items with pycharm.

查看文件helpers/pydev/_pydevd_bundle/pydevd_resolver.py

MAX_ITEMS_TO_HANDLE 编辑为您需要的任何内容.

Edit the MAX_ITEMS_TO_HANDLE to whatever you need.

# Note: 300 is already a lot to see in the outline (after that the user should really use the shell to get things)
# and this also means we'll pass less information to the client side (which makes debugging faster).
MAX_ITEMS_TO_HANDLE = 500

更改后无需重新启动IDE,只需重新运行脚本即可.

You don't need to restart IDE after the change, just rerun the script.

对于 Windows 10,可以在 Program Files/JetBrains/PyCharm /helpers/pydev/_pydevd_bundle/pydevd_resolver.py

For Windows 10, the file can be found at Program Files/JetBrains/PyCharm <version>/helpers/pydev/_pydevd_bundle/pydevd_resolver.py

这篇关于Pycharm(一个 Python IDE)只能显示列表的前 300 个成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆