[英]Can anyone else reproduce this bug in the Dart debugger/editor?
For my sanity, can someone verify a strange bug I'm having with the dart editor? 为了我的理智,有人可以验证我在Dart编辑器中遇到的奇怪错误吗?
I'm using the latest dart editor from the main page of the website, I downloaded, extracted, then ran the "DartEditor" executable. 我正在使用网站主页上的最新dart编辑器,我已下载,提取并运行了“ DartEditor”可执行文件。 (I didn't clear any previous settings that were stored elsewhere, but I don't think that will change the issue.) (我没有清除存储在其他位置的任何先前设置,但我认为这不会改变问题。)
Dart Editor version 1.0.0_r30798 (STABLE)
Dart SDK version 1.0.0.10_r30798
On console (not in the editor) run dart test/sprintf_test.dart
The output should be: 在控制台上(不在编辑器中)运行dart test/sprintf_test.dart
输出应为:
decimal=1, exp=0, digits=[5, 4, 6, 6]
Next, fire up the editor, and open the folder. 接下来,启动编辑器,然后打开文件夹。
With the breakpoint I'm getting the following output: 使用断点,我得到以下输出:
decimal=1, exp=0, digits=[0, 0, 5, 4, 6, 6]
I've attributed it to the List<String>
constructor, which seems to initialise to not be empty. 我将其归因于List<String>
构造函数,该构造函数似乎初始化为非空。
Does anyone else get this problem? 还有其他人遇到这个问题吗? I've tried to condense this into a testable single file, but have failed to reproduce; 我试图将其压缩到一个可测试的单个文件中,但是未能重现。 I'm only able to reproduce it in the actual project. 我只能在实际项目中复制它。
Definitely sounds like a bug. 绝对听起来像是个错误。 As Fox32 suggests, please file a bug on http://dartbug.com/new . 如Fox32所建议,请在http://dartbug.com/new上提交错误。
Generally these kind of bugs happen for two reasons: 通常,此类错误的发生有两个原因:
toString
method on visible variables, it could have a side-effect. 调试器具有副作用:如果调试器(在这里是Dart编辑器)对可见变量调用实际的toString
方法,则可能会有副作用。 Most commonly this happens to Iterable
s that have a side-effect. 最常见的情况是发生在具有副作用的Iterable
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.