Sha256: cbc6cd0419d49d5c0c48ad2449b4c4711f7a313ebaac6dbe16c0bfd51848401d

Contents?: true

Size: 715 Bytes

Versions: 29

Compression:

Stored size: 715 Bytes

Contents

module Debugger
  class TraceCommand < Command # :nodoc:
    def regexp
      /^\s*tr(?:ace)?(?:\s+(on|off))?(?:\s+(all))?$/
    end

    def execute
      if @match[2]
        Debugger.tracing = @match[1] == 'on'
      elsif @match[1]
        Debugger.current_context.tracing = @match[1] == 'on'
      end
      if Debugger.tracing || Debugger.current_context.tracing
        print "Trace on.\n"
      else
        print "Trace off.\n"
      end
    end

    class << self
      def help_command
        'trace'
      end

      def help(cmd)
        %{
          tr[ace] (on|off)\tset trace mode of current thread
          tr[ace] (on|off) all\tset trace mode of all threads
        }
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ruby-debug-0.7.5-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7.4-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7.3-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7.2-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7.1-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.6.2-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.6.1-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.6-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.5.2-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.10.0 cli/ruby-debug/commands/trace.rb
ruby-debug-0.10.1 cli/ruby-debug/commands/trace.rb
ruby-debug-0.6 lib/ruby-debug/commands/trace.rb
ruby-debug-0.7.1 lib/ruby-debug/commands/trace.rb
ruby-debug-0.5.3 lib/ruby-debug/commands/trace.rb
ruby-debug-0.6.1 lib/ruby-debug/commands/trace.rb
ruby-debug-0.5.2 lib/ruby-debug/commands/trace.rb
ruby-debug-0.6.2 lib/ruby-debug/commands/trace.rb
ruby-debug-0.9.1 cli/ruby-debug/commands/trace.rb
ruby-debug-0.9.2 cli/ruby-debug/commands/trace.rb