class Byebug::Runner
def debug_program
Debugs a script only if syntax checks okay.
def debug_program ok = syntax_valid?(File.read($PROGRAM_NAME)) fail(InvalidScript, 'The script has incorrect syntax') unless ok error = Byebug.debug_load($PROGRAM_NAME, stop) puts "#{error}\n#{error.backtrace}" if error end