debug
debug copied to clipboard
Slow print (STDOUT) of large objects
Your environment
-
ruby -v
: 3.3.0 -
rdbg -v
: 1.9.1
Describe the bug
Hi, I'm not sure if this is a bug or a request for an additional feature (or if there is already a way to circumvent it), but when I try to print large objects to STDOUT during the debug session, it takes ages to do so because it tries to puts
everything to the screen I believe.
To Reproduce
require 'debug'
def dummy_embeddings
arr = []
1536.times do
arr << 0.012312321312321
end
arr
end
result = []
1000.times do
result << {
a: 1,
b: 2,
dummy_embeddings: dummy_embeddings
}
end
binding.break
# result
Expected behavior Other debuggers add some kind of offest/"pagination" by default, when printing large objects. It would be great if this gem could do that too.