Class: DSP::StackFrame

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

Overview

interface StackFrame {

    /** An identifier for the stack frame. It must be unique across all threads.
        This id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe.
    */
    id: number;
    /** The name of the stack frame, typically a method name. */
    name: string;
    /** The optional source of the frame. */
    source?: Source;
    /** The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored. */
    line: number;
    /** The column within the line. If source is null or doesn't exist, column is 0 and must be ignored. */
    column: number;
    /** An optional end line of the range covered by the stack frame. */
    endLine?: number;
    /** An optional end column of the range covered by the stack frame. */
    endColumn?: number;
    /** Optional memory reference for the current instruction pointer in this frame. */
    instructionPointerReference?: string;
    /** The module associated with this frame, if any. */
    moduleId?: number | string;
    /** An optional hint for how to present this frame in the UI.
        A value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way.
    */
    presentationHint?: 'normal' | 'label' | 'subtle';
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ StackFrame

Returns a new instance of StackFrame.



3956
3957
3958
3959
# File 'lib/dsp/dsp_protocol.rb', line 3956

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[source endLine endColumn instructionPointerReference moduleId presentationHint]
end

Instance Attribute Details

#columnObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def column
  @column
end

#endColumnObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def endColumn
  @endColumn
end

#endLineObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def endLine
  @endLine
end

#idObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def id
  @id
end

#instructionPointerReferenceObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def instructionPointerReference
  @instructionPointerReference
end

#lineObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def line
  @line
end

#moduleIdObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def moduleId
  @moduleId
end

#nameObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def name
  @name
end

#presentationHintObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def presentationHint
  @presentationHint
end

#sourceObject

type: number # type: string # type: Source # type: number # type: number # type: number # type: number # type: string # type: number | string # type: string with value ‘normal’ | ‘label’ | ‘subtle’



3954
3955
3956
# File 'lib/dsp/dsp_protocol.rb', line 3954

def source
  @source
end

Instance Method Details

#from_h!(value) ⇒ Object



3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
# File 'lib/dsp/dsp_protocol.rb', line 3961

def from_h!(value)
  value = {} if value.nil?
  self.id = value['id']
  self.name = value['name']
  self.source = Source.new(value['source']) unless value['source'].nil?
  self.line = value['line']
  self.column = value['column']
  self.endLine = value['endLine']
  self.endColumn = value['endColumn']
  self.instructionPointerReference = value['instructionPointerReference']
  self.moduleId = value['moduleId'] # Unknown type
  self.presentationHint = value['presentationHint'] # Unknown type
  self
end