class Byebug::ThreadCommand::SwitchSubcommand


Switches to the specified thread

def description

def description
  <<-EOD
    th[read] sw[itch] <thnum>
    #{short_description}
  EOD
end

def execute

def execute
  return puts(help) unless @match[1]
  context, err = context_from_thread(@match[1])
  return errmsg(err) if err
  display_context(context)
  context.switch
  @state.proceed
end

def regexp

def regexp
  /^\s* sw(?:itch)? (?: \s* (\d+))? \s*$/x
end

def short_description

def short_description
  'Switches execution to the specified thread'
end