Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | List of all members
v8::Debug Class Reference

#include <v8-debug.h>

Classes

class  ClientData
 
class  EventDetails
 
class  Message
 

Public Types

typedef void(* EventCallback) (const EventDetails &event_details)
 
typedef void(* MessageHandler) (const Message &message)
 

Static Public Member Functions

static bool SetDebugEventListener (Isolate *isolate, EventCallback that, Local< Value > data=Local< Value >())
 
static void DebugBreak (Isolate *isolate)
 
static void CancelDebugBreak (Isolate *isolate)
 
static bool CheckDebugBreak (Isolate *isolate)
 
static void SetMessageHandler (Isolate *isolate, MessageHandler handler)
 
static void SendCommand (Isolate *isolate, const uint16_t *command, int length, ClientData *client_data=NULL)
 
static MaybeLocal< ValueCall (Local< Context > context, v8::Local< v8::Function > fun, Local< Value > data=Local< Value >())
 
static void ProcessDebugMessages (Isolate *isolate)
 
static Local< ContextGetDebugContext (Isolate *isolate)
 
static MaybeLocal< ContextGetDebuggedContext (Isolate *isolate)
 
static void SetLiveEditEnabled (Isolate *isolate, bool enable)
 
static MaybeLocal< ArrayGetInternalProperties (Isolate *isolate, Local< Value > value)
 
static bool IsTailCallEliminationEnabled (Isolate *isolate)
 
static void SetTailCallEliminationEnabled (Isolate *isolate, bool enabled)
 

Member Typedef Documentation

◆ EventCallback

typedef void(* v8::Debug::EventCallback) (const EventDetails &event_details)

Debug event callback function.

Parameters
event_detailsobject providing information about the debug event

A EventCallback does not take possession of the event data, and must not rely on the data persisting after the handler returns.

◆ MessageHandler

typedef void(* v8::Debug::MessageHandler) (const Message &message)

This is now a no-op.

Member Function Documentation

◆ Call()

static MaybeLocal< Value > v8::Debug::Call ( Local< Context context,
v8::Local< v8::Function fun,
Local< Value data = LocalValue >() 
)
static

Run a JavaScript function in the debugger.

Parameters
funthe function to call
datapassed as second argument to the function With this call the debugger is entered and the function specified is called with the execution state as the first argument. This makes it possible to get access to information otherwise not available during normal JavaScript execution e.g. details on stack frames. Receiver of the function call will be the debugger context global object, however this is a subject to change. The following example shows a JavaScript function which when passed to v8::Debug::Call will return the current line of JavaScript execution.
function frame_source_line(exec_state) {
return exec_state.frame(0).sourceLine();
}

◆ CancelDebugBreak()

static void v8::Debug::CancelDebugBreak ( Isolate isolate)
static

◆ CheckDebugBreak()

static bool v8::Debug::CheckDebugBreak ( Isolate isolate)
static

◆ DebugBreak()

static void v8::Debug::DebugBreak ( Isolate isolate)
static

◆ GetDebugContext()

static Local< Context > v8::Debug::GetDebugContext ( Isolate isolate)
static

Debugger is running in its own context which is entered while debugger messages are being dispatched. This is an explicit getter for this debugger context. Note that the content of the debugger context is subject to change. The Context exists only when the debugger is active, i.e. at least one DebugEventListener or MessageHandler is set.

◆ GetDebuggedContext()

static MaybeLocal< Context > v8::Debug::GetDebuggedContext ( Isolate isolate)
static

While in the debug context, this method returns the top-most non-debug context, if it exists.

◆ GetInternalProperties()

static MaybeLocal< Array > v8::Debug::GetInternalProperties ( Isolate isolate,
Local< Value value 
)
static

Returns array of internal properties specific to the value type. Result has the following format: [<name>,

,...,<name>,

]. Result array will be allocated in the current context.

◆ IsTailCallEliminationEnabled()

static bool v8::Debug::IsTailCallEliminationEnabled ( Isolate isolate)
static

Defines if the ES2015 tail call elimination feature is enabled or not. The change of this flag triggers deoptimization of all functions that contain calls at tail position.

◆ ProcessDebugMessages()

static void v8::Debug::ProcessDebugMessages ( Isolate isolate)
static

◆ SendCommand()

static void v8::Debug::SendCommand ( Isolate isolate,
const uint16_t *  command,
int  length,
ClientData client_data = NULL 
)
static

◆ SetDebugEventListener()

static bool v8::Debug::SetDebugEventListener ( Isolate isolate,
EventCallback  that,
Local< Value data = LocalValue >() 
)
static

◆ SetLiveEditEnabled()

static void v8::Debug::SetLiveEditEnabled ( Isolate isolate,
bool  enable 
)
static

Enable/disable LiveEdit functionality for the given Isolate (default Isolate if not provided). V8 will abort if LiveEdit is unexpectedly used. LiveEdit is enabled by default.

◆ SetMessageHandler()

static void v8::Debug::SetMessageHandler ( Isolate isolate,
MessageHandler  handler 
)
static

◆ SetTailCallEliminationEnabled()

static void v8::Debug::SetTailCallEliminationEnabled ( Isolate isolate,
bool  enabled 
)
static

The documentation for this class was generated from the following file: