byebug
byebug copied to clipboard
Obscure stack trace and error `NoMethodError`
I am unsure what is causing this error but am willing to debug it. I ran rubocop autocorrect and fixed linting issues in my project and then was getting the following error consistently afterwards. Any ideas on what might be causing this? Every time I do a require 'byebug'
and drop a debugger into a file I get this error.
NoMethodError:
undefined method `value' for nil:NilClass
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/setting.rb:45:in `[]'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/interface.rb:110:in `autosave'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/processors/command_processor.rb:121:in `after_repl'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/processors/command_processor.rb:100:in `ensure in process_commands'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/processors/command_processor.rb:100:in `process_commands'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/processors/command_processor.rb:56:in `at_line'
# /Users/bcnelson/.gem/ruby/2.4.0/gems/byebug-9.0.6/lib/byebug/context.rb:96:in `at_line'
If I run byebug rspec <myspec:line>
it seems to work properly...
I ran into a similar error. Moving the require
statements for byebug above all other requires seemed to resolve the problem for me.