Class: DSP::StackTraceArguments

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface StackTraceArguments {

    /** Retrieve the stacktrace for this thread. */
    threadId: number;
    /** The index of the first frame to return; if omitted frames start at 0. */
    startFrame?: number;
    /** The maximum number of frames to return. If levels is not specified or 0, all frames are returned. */
    levels?: number;
    /** Specifies details on how to format the stack frames.
        The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.
    */
    format?: StackFrameFormat;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ StackTraceArguments

Returns a new instance of StackTraceArguments.



2261
2262
2263
2264
# File 'lib/dsp/dsp_protocol.rb', line 2261

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[startFrame levels format]
end

Instance Attribute Details

#formatObject

type: number # type: number # type: number # type: StackFrameFormat



2259
2260
2261
# File 'lib/dsp/dsp_protocol.rb', line 2259

def format
  @format
end

#levelsObject

type: number # type: number # type: number # type: StackFrameFormat



2259
2260
2261
# File 'lib/dsp/dsp_protocol.rb', line 2259

def levels
  @levels
end

#startFrameObject

type: number # type: number # type: number # type: StackFrameFormat



2259
2260
2261
# File 'lib/dsp/dsp_protocol.rb', line 2259

def startFrame
  @startFrame
end

#threadIdObject

type: number # type: number # type: number # type: StackFrameFormat



2259
2260
2261
# File 'lib/dsp/dsp_protocol.rb', line 2259

def threadId
  @threadId
end

Instance Method Details

#from_h!(value) ⇒ Object



2266
2267
2268
2269
2270
2271
2272
2273
# File 'lib/dsp/dsp_protocol.rb', line 2266

def from_h!(value)
  value = {} if value.nil?
  self.threadId = value['threadId']
  self.startFrame = value['startFrame']
  self.levels = value['levels']
  self.format = StackFrameFormat.new(value['format']) unless value['format'].nil?
  self
end