This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When stopped at a breakpoint in a block that calls an iterator, the variables window shows the frame of the iterator, not the calling block which contains the breakpoint. This (otherwise pointless) code reproduces it: class Huh def initialize each_sorted( %w{cat elk dog bee ant}) do |w| x = w y = 0 end end def each_sorted( s) s2 = s.sort s2.each {|str| yield str} end end h = Huh.new Set a breakpoint on "y = 0" in initialize. When it stops there, the variables window shows the frame of the iterator, each_sorted, with s, s2 and str, rather than the frame of the calling proc, initialize, which would show w and x. This seems wrong and is quite a hindrance in debugging. I can get the right frame by going down the call stack two frames to the call of each_sorted in initialize, but that's a nuisance. I don't believe it worked this way last time I used NB/ruby (6.5 or 6.7, I think).
Note -- this only occurs with the native ruby platform, 1.9.2, not with JRuby.
Also, going to a different stack frame does not really solve the problem, as it does not show variables local to the iterated block itself.