class Byebug::DAP::Command::Threads

Public Instance Methods

execute() click to toggle source
# File lib/byebug/dap/commands/threads.rb, line 7
def execute
  started!

  respond! body: Protocol::ThreadsResponseBody.new(
    threads: Byebug
      .contexts
      .filter { |ctx| !ctx.thread.is_a?(::Byebug::DebugThread) }
      .map { |ctx| Protocol::Thread.new(
        id: ctx.thnum,
        name: ctx.thread.name || "Thread ##{ctx.thnum}"
      ).validate! })
end