byebug icon indicating copy to clipboard operation
byebug copied to clipboard

Obscure stack trace and error `NoMethodError`

Open illegalnumbers opened this issue 6 years ago • 2 comments

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'

illegalnumbers avatar Apr 13 '18 19:04 illegalnumbers

If I run byebug rspec <myspec:line> it seems to work properly...

illegalnumbers avatar Apr 13 '18 20:04 illegalnumbers

I ran into a similar error. Moving the require statements for byebug above all other requires seemed to resolve the problem for me.

pdrakeweb avatar Mar 05 '21 21:03 pdrakeweb