ruby-debug with Pow — breakpoints never hit

后端 未结 2 621
心在旅途
心在旅途 2021-02-15 16:41

I\'m trying to use ruby-debug with Pow. Rails 3 app.

I have done everything here: https://gist.github.com/1098830

I\'ve restarted the server and machine several

2条回答
  •  悲哀的现实
    2021-02-15 16:54

    Update Sept '12

    I switched to the debugger gem - a fork of ruby-debug19 with better support for ruby 1.9.2/3

    This also allowed to simplify the configuration for remote-debugging in development.rb. I hit the breakpoint every single time and have no hanging processes.

    require 'debugger'
    Debugger.start_remote
    

    Original Answer

    Try enabling wait_connection (and restart pow)

    require 'ruby-debug'
    Debugger.wait_connection = true
    Debugger.start_remote
    Debugger.settings[:autoeval] = true
    puts "=> Debugger enabled"
    

    reload source is also nice: Debugger.settings[:reload_source_on_change] = true

提交回复
热议问题