Sha256: 400ed2c87ff0993840495d9a970580a6f35b3ef18485c6dbefa98333142d5341
Contents?: true
Size: 856 Bytes
Versions: 18
Compression:
Stored size: 856 Bytes
Contents
#!/usr/bin/env ruby require_relative '../lib/debug/config' config = DEBUGGER__::Config::parse_argv(ARGV) case config[: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) env['RUBYOPT'] = "-r #{libpath}/#{start_mode}" exec(env, cmd, *ARGV) when :attach require_relative "../lib/debug/client" ::DEBUGGER__::CONFIG.update 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
18 entries across 18 versions & 3 rubygems