Eclipse上的变量查看器调试截断字符串值 [英] Variables viewer on Eclipse debugging truncates the string values

查看:308
本文介绍了Eclipse上的变量查看器调试截断字符串值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试Python代码,当我尝试显示一个字符串变量的内容时,它显示截断...

I'm debugging Python code and when I try to show the contents of an string variable its showed truncated...

如何显示全部内容在Eclipse上使用PyDev调试Python代码?

How can show the full contents of a variable debugging Python code with PyDev on Eclipse?

推荐答案

如果右键单击变量视图中的详细信息窗格或表达式视图中,有一个最大长度... 菜单选项。您可以在其中输入一个数字来配置字符串输出的截断。请记住,计算的长度包括开头的类型标识符,因此 str:12345 实际上是10个字符,而不是5。

If you right-click on the details pane in either the "Variables" view or the "Expressions" view, there is a Max Length... menu option. You can enter a number there to configure the truncation of string output. Keep in mind that the calculated length includes the type identifier at the beginning, so str: 12345 is actually 10 characters, not 5.

即使输入 0 ,字段描述声明意味着无限制,似乎也有1000个字符的硬限制,所以无论你放置什么在,你永远不会看到超过1000个字符。我不知道这是不是已知的问题;我没有看过。对于长于此的字符串或其他变量,我通常使用 logging 模块,并将字符串发送到日志文件或stderr。

There seems to be a hard limit of 1000 characters, even when entering 0, which the field description claims means "unlimited," so no matter what you put in, you will never see more than 1000 characters. I don't know if that's a known issue or not; I have not looked into it. For strings or other variables longer than this, I generally use the logging module from the standard library and send the string to a log file or stderr.

这篇关于Eclipse上的变量查看器调试截断字符串值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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