struct Protocol::Debugger::SetScriptSource

Overview

Edits JavaScript source live.

In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a Debugger.restartFrame for the top-most function is automatically triggered.

Included Modules

Defined in:

protocol/debugger.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def async_stack_trace : Runtime::StackTrace | Nil #

Async stack trace, if any.


[View source]
def async_stack_trace_id : Runtime::StackTraceId | Nil #

Async stack trace, if any.


[View source]
def call_frames : Array(CallFrame) | Nil #

New stack trace in case editing has happened while VM was stopped.


[View source]
def exception_details : Runtime::ExceptionDetails | Nil #

Exception details if any. Only present when #status is CompileError.


[View source]
def stack_changed : Bool | Nil #

Whether current call stack was modified after applying the changes.


[View source]
def status : String #

Whether the operation was successful or not. Only Ok denotes a successful live edit while the other enum variants denote why the live edit failed.


[View source]