Sha256: 754455ea9fb32b50bab7acf5bab0086ceed8548abedfc097102911ba70a0e7a0

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

if ARGV[0].nil? || ARGV[0].empty? || ARGV[0] == "-h" || ARGV[0] == "--help"
  puts "\nUsage: debug-socket <socket-path> [<command>=backtrace]"
  exit 1
end

socket = ARGV[0]
command = ARGV[1] || "backtrace"

warn "\nSending `#{command}` to the following socket: #{socket}"\
  "----------------------------------------------------------\n\n"

Kernel.exec("echo #{command} | socat - UNIX-CONNECT:#{socket}")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
debug_socket-0.1.6 exe/debug-socket