v8  5.8.282(node8.0.0)
V8 is Google's open source JavaScript engine
Debug Class Reference

#include <v8-debug.h>

Data Structures

class  ClientData
class  EventDetails
class  Message

Public Types

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

Public Member Functions

 V8_DEPRECATED ("No longer supported", static bool CheckDebugBreak(Isolate *isolate))
 V8_DEPRECATED ("No longer supported", static void SetMessageHandler(Isolate *isolate, MessageHandler handler))
 V8_DEPRECATED ("No longer supported", static void SendCommand(Isolate *isolate, const uint16_t *command, int length, ClientData *client_data=NULL))
 V8_DEPRECATED ("No longer supported", static void ProcessDebugMessages(Isolate *isolate))
 V8_DEPRECATED ("Use v8-inspector", static Local< Context > GetDebugContext(Isolate *isolate))
 V8_DEPRECATED ("No longer supported", static MaybeLocal< Context > GetDebuggedContext(Isolate *isolate))

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 MaybeLocal< ValueCall (Local< Context > context, v8::Local< v8::Function > fun, Local< Value > data=Local< Value >())
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)

Detailed Description

Definition at line 24 of file v8-debug.h.

Member Typedef Documentation

typedef void(* DebugMessageDispatchHandler) ()

This is now a no-op.

Definition at line 146 of file v8-debug.h.

typedef void(* EventCallback) (const EventDetails &event_details)

Debug event callback function.

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.

Definition at line 136 of file v8-debug.h.

typedef void(* MessageHandler) (const Message &message)

This is now a no-op.

Definition at line 141 of file v8-debug.h.

Member Function Documentation

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

Run a JavaScript function in the debugger.

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();
static void CancelDebugBreak ( Isolate isolate)
static void DebugBreak ( Isolate isolate)
static MaybeLocal<Array> GetInternalProperties ( Isolate isolate,
Local< Value value 

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


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

static bool IsTailCallEliminationEnabled ( Isolate isolate)

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.

static bool SetDebugEventListener ( Isolate isolate,
EventCallback  that,
Local< Value data = LocalValue >() 
static void SetLiveEditEnabled ( Isolate isolate,
bool  enable 

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.

static void SetTailCallEliminationEnabled ( Isolate isolate,
bool  enabled 
V8_DEPRECATED ( "No longer supported"  ,
static bool   CheckDebugBreakIsolate *isolate 
V8_DEPRECATED ( "No longer supported"  ,
static void   SetMessageHandlerIsolate *isolate, MessageHandler handler 
V8_DEPRECATED ( "No longer supported"  ,
static void   SendCommandIsolate *isolate, const uint16_t *command, int length, ClientData *client_data=NULL 
V8_DEPRECATED ( "No longer supported"  ,
static void   ProcessDebugMessagesIsolate *isolate 
V8_DEPRECATED ( "Use v8-inspector"  ,
static Local< Context >   GetDebugContextIsolate *isolate 

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.

V8_DEPRECATED ( "No longer supported"  ,
static MaybeLocal< Context >   GetDebuggedContextIsolate *isolate 

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

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