Tag: byebug

byebug,仅限应用程序代码

当我在Rails应用程序中按n (或键入next )时,我经常会遇到一些我不感兴趣的gem方法,而且我必须多次按n才能继续执行。 有没有办法,除了用byebug调用填充我的代码,只是留在我的应用程序的框架? 有小费吗?

(未定义的局部变量或方法`byebug’

我有以下错误: NameError(未定义的局部变量或方法`byebug’ 代码是 def test t = “” byebug end – RAILS_ENV =开发gem列表| 再见 byebug(3.5.1) 然后我跑: RAILS_ENV =开发导轨 但它显示: NameError(未定义的局部变量或方法`byebug’ 你知道为什么吗? 谢谢!

如何使用Byebug进行远程处理(例如,pow)

如何连接到Byebug的远程调试实例(与Pow等一起使用)?

Pry-Remote没有触发Rails 4

问题: 升级到另一个分支中的Rails 4并尝试使用Pow on Rails 4上次使用Pry-Remote工作的解决方案。 我仍然发现新的Rails 4和Pry Debugger有困难。 我在跑什么 rvm 1.26.11 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/] ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] Rails 4.2.4 Pry version 0.10.2 on Ruby 2.2.3 # Debugging gem ‘pry’ gem ‘pry-byebug’ gem ‘pry-stack_explorer’ gem ‘pry-rails’ gem ‘pry-remote’ gem ‘byebug’ pry (0.10.2) coderay (~> 1.1.0) method_source […]

使用byebug进行调试时如何缩放堆栈?

我目前收到的错误如下: NoMethodError: undefined method `debug’ for nil:NilClass /mnt/hgfs/Dropbox/Company/Project/lib/project/misc.rb:23:in `debug’ /mnt/hgfs/Dropbox/Company/Project/lib/project/validation/google_geocoding_validation_engine.rb:49:in `block in compare_addresses’ /mnt/hgfs/Dropbox/Company/Project/lib/project/validation/google_geocoding_validation_engine.rb:43:in `each’ /mnt/hgfs/Dropbox/Company/Project/lib/project/validation/google_geocoding_validation_engine.rb:43:in `compare_addresses’ /mnt/hgfs/Dropbox/Company/Project/lib/project/validation/google_geocoding_validation_engine.rb:32:in `valid?’ /mnt/hgfs/Dropbox/Company/Project/specs/project/validation/google_geocoding_validation_engine_spec.rb:56:in `block (2 levels) in ‘ /home/tomas/ruby2/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run’ 我想我会尝试使用byebug来弄清楚为什么对象是nil因为它永远不应该是nil 。 我把byebug放在错误的线上: def debug(&block) if @logger.nil? byebug end @logger.debug(@logger_name, &block) end 然后运行测试。 我被放到了byebug调试界面,可以确认对象确实是nil 。 问题是我无法爬上堆栈: (byebug) up *** Adjusting would put us beyond the oldest (initial) frame. […]

Rails Byebug没有停止申请

我想使用byebug来调试我的应用程序,但应用程序永远不会停止,尽管我已经将byebug放在我的代码中。 这是我的Gemfile。 group :development, :test do # Call ‘byebug’ anywhere in the code to stop execution and get a debugger console gem ‘byebug’, ‘~> 5.0.0’ # Access an IRB console on exception pages or by using in views gem ‘web-console’, ‘~> 2.0’ end 我把byebug放在我的一个控制器里。 def edit byebug present Ingredient::Update end 我已经在我的development.rb中完成了我的所有请求。 我已经重启了服务器几次。 config.consider_all_requests_local = true […]