Sha256: 421dc152f5bd157b97ef806e8523560e101072cf3dda0170239fd66e75977367
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
#!/usr/bin/env ruby require_relative '../lib/debug/config' config = DEBUGGER__::Config::parse_argv(ARGV) # mode is not an actual configuration option # it's only used to carry the result of parse_argv here case config.delete(:mode) when :start require 'rbconfig' libpath = File.join(File.expand_path(File.dirname(__dir__)), 'lib/debug') start_mode = config[:remote] ? "open" : 'start' cmd = config[:command] ? ARGV.shift : (ENV['RUBY'] || RbConfig.ruby) env = ::DEBUGGER__::Config.config_to_env_hash(config) rubyopt = env['RUBYOPT'] env['RUBY_DEBUG_ADDED_RUBYOPT'] = added = "-r #{libpath}/#{start_mode}" env['RUBYOPT'] = "#{added} #{rubyopt}" exec(env, cmd, *ARGV) when :attach require_relative "../lib/debug/client" ::DEBUGGER__::CONFIG.set_config(**config) begin if ARGV.empty? && config[:port] DEBUGGER__::Client.new([config[:host], config[:port]].compact).connect else DEBUGGER__::Client.new(ARGV).connect end rescue DEBUGGER__::CommandLineOptionError puts opt.help end else raise # assert end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
debug-1.6.1 | exe/rdbg |