ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
371 stars 83 forks source link

When started without breakpoints, only pauses code execution once #233

Open vagoston opened 2 years ago

vagoston commented 2 years ago

Steps to reproduce: You have to start rdebug-ide and attach with the IDE, but no breakpoints set yet. If you debug a simple loop, you can set a breakpoint after debugger started or you can pause. So far so good, but if you resume execution, you can't pause again, and breakpoints have no effect either. Most likely this is a bug on debase side, https://github.com/ruby-debug/debase/blob/77040d792a68bb1f4b65bd009356182867b3dd96/lib/debase/rbx.rb#L14 Possible workaround:

      abs_prog_script = File.expand_path(Debugger::PROG_SCRIPT)
      # debase debug_load will misbehave if it's started without a breakpoint
      Debugger.add_breakpoint("debase_filler.rb", 1, nil) if Debugger.breakpoints.empty?
      bt = debug_load(abs_prog_script, options.stop, options.load_mode)