| Server IP : 217.160.0.244 / Your IP : 216.73.216.36 Web Server : Apache System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64 User : u100174116 ( 6746176) PHP Version : 8.5.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/ |
Upload File : |
# frozen_string_literal: true
require 'irb'
module DEBUGGER__
module IrbPatch
def evaluate(line, line_no)
SESSION.send(:restart_all_threads)
super
# This is to communicate with the test framework so it can feed the next input
puts "INTERNAL_INFO: {}" if ENV['RUBY_DEBUG_TEST_UI'] == 'terminal'
ensure
SESSION.send(:stop_all_threads)
end
end
class ThreadClient
def activate_irb_integration
IRB.setup(location, argv: [])
workspace = IRB::WorkSpace.new(current_frame&.binding || TOPLEVEL_BINDING)
irb = IRB::Irb.new(workspace)
IRB.conf[:MAIN_CONTEXT] = irb.context
IRB::Debug.setup(irb)
IRB::Context.prepend(IrbPatch)
end
end
class Session
def deactivate_irb_integration
Reline.completion_proc = nil
Reline.output_modifier_proc = nil
Reline.autocompletion = false
Reline.dig_perfect_match_proc = nil
reset_ui UI_LocalConsole.new
end
end
end