# class Byebug::UntracevarCommand

Stop tracing a global variable.

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/untracevar.rb, line 29
    def description
      prettify <<-EOD
        untr[acevar] <variable>

        Stop tracing global variable <variable>.
      EOD
    end

names() click to toggle source

    # File lib/byebug/commands/untracevar.rb, line 25
    def names
      %w(untracevar)
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/untracevar.rb, line 14
    def execute
      var = @match[1]
      if global_variables.include?(:"#{var}")
        untrace_var(:"#{var}")
        puts pr('trace.messages.undo', var: var)
      else
        errmsg pr('trace.errors.not_global', var: var)
      end
    end

regexp() click to toggle source

    # File lib/byebug/commands/untracevar.rb, line 10
    def regexp
      /^\s* untr(?:acevar)? (?:\s+ (\S+))? \s*$/x
    end