Sha256: 91db12a26c20ad50ebbcc172e40088170a54f548e2f7e21db1affaa114f72d90

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 Bytes

Contents

module Byebug::DAP
  class Command::Threads < Command
    # "The request retrieves a list of all threads.

    register!

    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
byebug-dap-0.1.4 lib/byebug/dap/commands/threads.rb