Sha256: 956826d1165a656ce8284f0c2cd6a9937655b8e9b437fef29632fe346c65c1cd

Contents?: true

Size: 685 Bytes

Versions: 6

Compression:

Stored size: 685 Bytes

Contents

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

    def execute
      if @match[2]
        Debugger.tracing = @match[1] == 'on'
      elsif @match[1]
        @state.context.tracing = @match[1] == 'on'
      end
      if Debugger.tracing || @state.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

6 entries across 6 versions & 1 rubygems

Version Path
ruby-debug-0.4.1-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.4-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.3-mswin32 lib/ruby-debug/commands/trace.rb
ruby-debug-0.4 lib/ruby-debug/commands/trace.rb
ruby-debug-0.4.1 lib/ruby-debug/commands/trace.rb
ruby-debug-0.3 lib/ruby-debug/commands/trace.rb