Sha256: 8156901182117364241e101c092fd827e16f8484833a4e6fabb21ea030d79c8a
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
# -*- coding: utf-8 -*- # Copyright (C) 2011 Rocky Bernstein <rockyb@rubyforge.net> require_relative '../base/subcmd' class Trepan::Subcommand::SetReload < Trepan::SetBoolSubcommand unless defined?(HELP) Trepanning::Subcommand.set_name_prefix(__FILE__, self) SHORT_HELP = "Set whether to reread source text when it changes." IN_LIST = true MIN_ABBREV = 're'.size HELP = <<-EOH #{CMD} {on|off} Source text is cached on the first read. This ensures that if you change the source text after the debugged program is runnning you will still see the source code as pertains to the running program rather than what is in the filesystem. However sometimes this may not be what you want. In particular in running Ruby on Rails in development, Rails will also detect file changes and will reload the source code. So here the debugger will be out of sync. Set this to true, and the debugger will notice such changes and reread the source text when it discovers it has changed. See also "info source" and "info files" and note the SHA1 and file modification time. EOH end end if __FILE__ == $0 # Demo it. $0 = __FILE__ + 'notagain' # So we don't run this agin require_relative '../../mock' cmd = MockDebugger::sub_setup(Trepan::Subcommand::SetReload, false) cmd.run(cmd.prefix + ['off']) cmd.run(cmd.prefix + ['ofn']) cmd.run(cmd.prefix) puts cmd.save_command end
Version data entries
5 entries across 5 versions & 1 rubygems