byebug icon indicating copy to clipboard operation
byebug copied to clipboard

Post-mortem debugging does not work for exceptions in threads

Open zetetic opened this issue 8 years ago • 0 comments

ruby 2.2.4p230 byebug 9.0.5

Byebug post-mortem debugging does not appear to work with exceptions raised in threads. For example:

$ cat fail.rb
fail 'Epic fail!'

$ byebug --post-mortem --no-stop fail.rb

This halts on the 'fail' line with the byebug post-mortem prompt, which works as expected. But:

$ cat fail_in_thread.rb
t = Thread.new do
  fail 'Epic fail!'
end
t.join

$ byebug --post-mortem --no-stop fail_in_thread.rb

This halts on the last line and displays the byebug post-mortem prompt, but any command results in the error:

*** NoMethodError Exception: private method `eval' called for nil:NilClass

zetetic avatar Jul 06 '16 19:07 zetetic