v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::debug Namespace Reference

Classes

class  AccessorPair
 
class  AsyncEventDelegate
 
class  BreakLocation
 
class  ConsoleCallArguments
 
class  ConsoleContext
 
class  ConsoleDelegate
 
class  Coverage
 
class  DebugDelegate
 
class  DisableBreakScope
 
class  DisassemblyCollector
 
class  EphemeronTable
 
class  GeneratorObject
 
struct  LiveEditResult
 
class  Location
 
class  PostponeInterruptsScope
 
struct  PropertyDescriptor
 
class  PropertyIterator
 
class  ScopeIterator
 
class  Script
 
class  ScriptSource
 
class  StackTraceIterator
 

Typedefs

typedef base::EnumSet< BreakReasonBreakReasons
 
using BreakpointId = int
 
using OutOfMemoryCallback = void (*)(void* data)
 

Enumerations

enum class  PrivateMemberFilter { kPrivateMethods = 1 , kPrivateFields = 1 << 1 , kPrivateAccessors = 1 << 2 }
 
enum  ExceptionBreakState { NoBreakOnException = 0 , BreakOnCaughtException = 1 , BreakOnUncaughtException = 2 , BreakOnAnyException = 3 }
 
enum  StepAction { StepOut = 0 , StepOver = 1 , StepInto = 2 }
 
enum class  BreakReason : uint8_t {
  kAlreadyPaused , kStep , kAsyncStep , kException ,
  kAssert , kDebuggerStatement , kOOM , kScheduled ,
  kAgent
}
 
enum  ExceptionType { kException , kPromiseRejection }
 
enum  Builtin { kStringToLowerCase }
 
enum class  NativeAccessorType { None = 0 , HasGetter = 1 << 0 , HasSetter = 1 << 1 , IsValueUnavailable = 1 << 2 }
 
enum class  EvaluateGlobalMode { kDefault , kDisableBreaks , kDisableBreaksAndThrowOnSideEffect }
 
enum  DebugAsyncActionType {
  kDebugAwait , kDebugPromiseThen , kDebugPromiseCatch , kDebugPromiseFinally ,
  kDebugWillHandle , kDebugDidHandle , kDebugStackTraceCaptured
}
 
enum  BreakLocationType { kCallBreakLocation , kReturnBreakLocation , kDebuggerStatementBreakLocation , kCommonBreakLocation }
 
enum class  CoverageMode {
  kBestEffort , kPreciseCount , kPreciseBinary , kBlockCount ,
  kBlockBinary
}
 

Functions

void SetContextId (Local< Context > context, int id)
 
int GetContextId (Local< Context > context)
 
void SetInspector (Isolate *isolate, v8_inspector::V8Inspector *inspector)
 
v8_inspector::V8InspectorGetInspector (Isolate *isolate)
 
Local< StringGetBigIntStringValue (Isolate *isolate, Local< BigInt > bigint)
 
Local< StringGetBigIntDescription (Isolate *isolate, Local< BigInt > bigint)
 
Local< StringGetDateDescription (Local< Date > date)
 
Local< StringGetFunctionDescription (Local< Function > function)
 
void SetBreakOnNextFunctionCall (Isolate *isolate)
 
void ClearBreakOnNextFunctionCall (Isolate *isolate)
 
MaybeLocal< ArrayGetInternalProperties (Isolate *v8_isolate, Local< Value > value)
 
bool GetPrivateMembers (Local< Context > context, Local< Object > object, int filter, LocalVector< Value > *names_out, LocalVector< Value > *values_out)
 
MaybeLocal< ContextGetCreationContext (Local< Object > value)
 
void ChangeBreakOnException (Isolate *isolate, ExceptionBreakState type)
 
void SetBreakPointsActive (Isolate *v8_isolate, bool is_active)
 
void PrepareStep (Isolate *v8_isolate, StepAction action)
 
bool PrepareRestartFrame (Isolate *v8_isolate, int callFrameOrdinal)
 
void ClearStepping (Isolate *v8_isolate)
 
void BreakRightNow (Isolate *v8_isolate, base::EnumSet< debug::BreakReason > break_reasons)
 
void SetTerminateOnResume (Isolate *v8_isolate)
 
bool CanBreakProgram (Isolate *v8_isolate)
 
void RemoveBreakpoint (Isolate *v8_isolate, BreakpointId id)
 
PlatformGetCurrentPlatform ()
 
void ForceGarbageCollection (Isolate *isolate, StackState embedder_stack_state)
 
void GetLoadedScripts (Isolate *v8_isolate, std::vector< v8::Global< Script > > &scripts)
 
MaybeLocal< UnboundScriptCompileInspectorScript (Isolate *v8_isolate, Local< String > source)
 
void SetDebugDelegate (Isolate *v8_isolate, DebugDelegate *delegate)
 
void SetAsyncEventDelegate (Isolate *v8_isolate, AsyncEventDelegate *delegate)
 
void ResetBlackboxedStateCache (Isolate *v8_isolate, Local< Script > script)
 
int EstimatedValueSize (Isolate *v8_isolate, Local< Value > value)
 
Local< FunctionGetBuiltin (Isolate *v8_isolate, Builtin requested_builtin)
 
void SetConsoleDelegate (Isolate *v8_isolate, ConsoleDelegate *delegate)
 
v8::Local< v8::MessageCreateMessageFromException (Isolate *v8_isolate, v8::Local< v8::Value > v8_error)
 
MaybeLocal< ValueCallFunctionOn (Local< Context > context, Local< Function > function, Local< Value > recv, base::Vector< Local< Value > > args, bool throw_on_side_effect)
 
MaybeLocal< v8::ValueEvaluateGlobal (v8::Isolate *isolate, v8::Local< v8::String > source, EvaluateGlobalMode mode, bool repl)
 
void GlobalLexicalScopeNames (v8::Local< v8::Context > v8_context, std::vector< v8::Global< v8::String > > *names)
 
void SetReturnValue (v8::Isolate *v8_isolate, v8::Local< v8::Value > value)
 
int64_t GetNextRandomInt64 (v8::Isolate *v8_isolate)
 
int GetDebuggingId (v8::Local< v8::Function > function)
 
bool SetFunctionBreakpoint (v8::Local< v8::Function > function, v8::Local< v8::String > condition, BreakpointId *id)
 
MaybeLocal< MessageGetMessageFromPromise (Local< Promise > p)
 
void RecordAsyncStackTaggingCreateTaskCall (v8::Isolate *v8_isolate)
 
void NotifyDebuggerPausedEventSent (v8::Isolate *v8_isolate)
 
uint64_t GetIsolateId (v8::Isolate *v8_isolate)
 
void SetIsolateId (v8::Isolate *v8_isolate, uint64_t id)
 

Typedef Documentation

◆ BreakpointId

Definition at line 183 of file interface-types.h.

◆ BreakReasons

◆ OutOfMemoryCallback

using v8::debug::OutOfMemoryCallback = void (*)(void* data)

Definition at line 69 of file heap.h.

Enumeration Type Documentation

◆ BreakLocationType

Enumerator
kCallBreakLocation 
kReturnBreakLocation 
kDebuggerStatementBreakLocation 
kCommonBreakLocation 

Definition at line 58 of file interface-types.h.

◆ BreakReason

enum class v8::debug::BreakReason : uint8_t
strong
Enumerator
kAlreadyPaused 
kStep 
kAsyncStep 
kException 
kAssert 
kDebuggerStatement 
kOOM 
kScheduled 
kAgent 

Definition at line 132 of file debug-interface.h.

◆ Builtin

Enumerator
kStringToLowerCase 

Definition at line 365 of file debug-interface.h.

◆ CoverageMode

enum class v8::debug::CoverageMode
strong
Enumerator
kBestEffort 
kPreciseCount 
kPreciseBinary 
kBlockCount 
kBlockBinary 

Definition at line 65 of file interface-types.h.

◆ DebugAsyncActionType

Enumerator
kDebugAwait 
kDebugPromiseThen 
kDebugPromiseCatch 
kDebugPromiseFinally 
kDebugWillHandle 
kDebugDidHandle 
kDebugStackTraceCaptured 

Definition at line 48 of file interface-types.h.

◆ EvaluateGlobalMode

enum class v8::debug::EvaluateGlobalMode
strong
Enumerator
kDefault 
kDisableBreaks 
kDisableBreaksAndThrowOnSideEffect 

Definition at line 558 of file debug-interface.h.

◆ ExceptionBreakState

Enumerator
NoBreakOnException 
BreakOnCaughtException 
BreakOnUncaughtException 
BreakOnAnyException 

Definition at line 106 of file debug-interface.h.

◆ ExceptionType

Enumerator
kException 
kPromiseRejection 

Definition at line 297 of file debug-interface.h.

◆ NativeAccessorType

enum class v8::debug::NativeAccessorType
strong
Enumerator
None 
HasGetter 
HasSetter 
IsValueUnavailable 

Definition at line 544 of file debug-interface.h.

◆ PrivateMemberFilter

enum class v8::debug::PrivateMemberFilter
strong
Enumerator
kPrivateMethods 
kPrivateFields 
kPrivateAccessors 

Definition at line 78 of file debug-interface.h.

◆ StepAction

Enumerator
StepOut 
StepOver 
StepInto 

Definition at line 124 of file debug-interface.h.

Function Documentation

◆ BreakRightNow()

V8_EXPORT_PRIVATE void v8::debug::BreakRightNow ( Isolate * v8_isolate,
base::EnumSet< debug::BreakReason > break_reasons )

Definition at line 414 of file debug-interface.cc.

Here is the caller graph for this function:

◆ CallFunctionOn()

MaybeLocal< Value > v8::debug::CallFunctionOn ( Local< Context > context,
Local< Function > function,
Local< Value > recv,
base::Vector< Local< Value > > args,
bool throw_on_side_effect )

Definition at line 1184 of file debug-interface.cc.

Here is the call graph for this function:

◆ CanBreakProgram()

bool v8::debug::CanBreakProgram ( Isolate * v8_isolate)

Definition at line 428 of file debug-interface.cc.

Here is the caller graph for this function:

◆ ChangeBreakOnException()

void v8::debug::ChangeBreakOnException ( Isolate * isolate,
ExceptionBreakState state )

Defines if VM will pause on exceptions or not. If BreakOnAnyExceptions is set then VM will pause on caught and uncaught exception, if BreakOnUncaughtException is set then VM will pause only on uncaught exception, otherwise VM won't stop on any exception.

Definition at line 366 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearBreakOnNextFunctionCall()

V8_EXPORT_PRIVATE void v8::debug::ClearBreakOnNextFunctionCall ( Isolate * isolate)

Definition at line 177 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearStepping()

void v8::debug::ClearStepping ( Isolate * v8_isolate)

Definition at line 407 of file debug-interface.cc.

Here is the caller graph for this function:

◆ CompileInspectorScript()

MaybeLocal< UnboundScript > v8::debug::CompileInspectorScript ( Isolate * v8_isolate,
Local< String > source )

Definition at line 997 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateMessageFromException()

V8_EXPORT_PRIVATE v8::Local< v8::Message > v8::debug::CreateMessageFromException ( Isolate * v8_isolate,
v8::Local< v8::Value > v8_error )

Definition at line 1137 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EstimatedValueSize()

int v8::debug::EstimatedValueSize ( Isolate * v8_isolate,
Local< Value > value )

Definition at line 1057 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EvaluateGlobal()

V8_EXPORT_PRIVATE v8::MaybeLocal< v8::Value > v8::debug::EvaluateGlobal ( v8::Isolate * isolate,
v8::Local< v8::String > source,
EvaluateGlobalMode mode,
bool repl )

Definition at line 1210 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ForceGarbageCollection()

void v8::debug::ForceGarbageCollection ( Isolate * isolate,
StackState embedder_stack_state )

Definition at line 791 of file debug-interface.cc.

Here is the caller graph for this function:

◆ GetBigIntDescription()

Local< String > v8::debug::GetBigIntDescription ( Isolate * isolate,
Local< BigInt > bigint )

Definition at line 108 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetBigIntStringValue()

Local< String > v8::debug::GetBigIntStringValue ( Isolate * isolate,
Local< BigInt > bigint )

Definition at line 98 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetBuiltin()

Local< Function > v8::debug::GetBuiltin ( Isolate * v8_isolate,
Builtin requested_builtin )

Definition at line 1093 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetContextId()

int v8::debug::GetContextId ( Local< Context > context)

Definition at line 42 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCreationContext()

MaybeLocal< Context > v8::debug::GetCreationContext ( Local< Object > value)

Forwards to v8::Object::CreationContext, but with special handling for JSGlobalProxy objects.

Definition at line 357 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetCurrentPlatform()

v8::Platform * v8::debug::GetCurrentPlatform ( )

Definition at line 789 of file debug-interface.cc.

Here is the caller graph for this function:

◆ GetDateDescription()

Local< String > v8::debug::GetDateDescription ( Local< Date > date)

Definition at line 123 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetDebuggingId()

int v8::debug::GetDebuggingId ( v8::Local< v8::Function > function)

Definition at line 1256 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetFunctionDescription()

Local< String > v8::debug::GetFunctionDescription ( Local< Function > function)

Definition at line 135 of file debug-interface.cc.

Here is the call graph for this function:

◆ GetInspector()

v8_inspector::V8Inspector * v8::debug::GetInspector ( Isolate * isolate)

Definition at line 59 of file debug-interface.cc.

Here is the caller graph for this function:

◆ GetInternalProperties()

MaybeLocal< Array > v8::debug::GetInternalProperties ( Isolate * isolate,
Local< Value > value )

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.

Definition at line 183 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIsolateId()

uint64_t v8::debug::GetIsolateId ( v8::Isolate * v8_isolate)

Definition at line 1436 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLoadedScripts()

V8_EXPORT_PRIVATE void v8::debug::GetLoadedScripts ( Isolate * v8_isolate,
std::vector< v8::Global< Script > > & scripts )

Definition at line 972 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMessageFromPromise()

MaybeLocal< Message > v8::debug::GetMessageFromPromise ( Local< Promise > p)

Definition at line 1413 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextRandomInt64()

int64_t v8::debug::GetNextRandomInt64 ( v8::Isolate * v8_isolate)

Definition at line 1250 of file debug-interface.cc.

Here is the caller graph for this function:

◆ GetPrivateMembers()

V8_EXPORT_PRIVATE bool v8::debug::GetPrivateMembers ( Local< Context > context,
Local< Object > value,
int filter,
LocalVector< Value > * names_out,
LocalVector< Value > * values_out )

Retrieve both instance and static private members on an object. filter should be a combination of PrivateMemberFilter. Returns through the out parameters names_out a vector of names in v8::String and through values_out the corresponding values. Private fields and methods are returned directly while accessors are returned as v8::debug::AccessorPair. Missing components in the accessor pairs are null. If an exception occurs, false is returned. Otherwise true is returned. Results will be allocated in the current context and handle scope.

Definition at line 226 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GlobalLexicalScopeNames()

void v8::debug::GlobalLexicalScopeNames ( v8::Local< v8::Context > v8_context,
std::vector< v8::Global< v8::String > > * names )

Definition at line 1226 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NotifyDebuggerPausedEventSent()

void v8::debug::NotifyDebuggerPausedEventSent ( v8::Isolate * v8_isolate)

Definition at line 1431 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrepareRestartFrame()

bool v8::debug::PrepareRestartFrame ( Isolate * v8_isolate,
int callFrameOrdinal )

Definition at line 393 of file debug-interface.cc.

Here is the caller graph for this function:

◆ PrepareStep()

void v8::debug::PrepareStep ( Isolate * v8_isolate,
StepAction action )

Definition at line 383 of file debug-interface.cc.

Here is the caller graph for this function:

◆ RecordAsyncStackTaggingCreateTaskCall()

void v8::debug::RecordAsyncStackTaggingCreateTaskCall ( v8::Isolate * v8_isolate)

Definition at line 1426 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveBreakpoint()

void v8::debug::RemoveBreakpoint ( Isolate * v8_isolate,
BreakpointId id )

Definition at line 783 of file debug-interface.cc.

Here is the caller graph for this function:

◆ ResetBlackboxedStateCache()

void v8::debug::ResetBlackboxedStateCache ( Isolate * v8_isolate,
Local< Script > script )

Definition at line 1043 of file debug-interface.cc.

Here is the call graph for this function:

◆ SetAsyncEventDelegate()

V8_EXPORT_PRIVATE void v8::debug::SetAsyncEventDelegate ( Isolate * v8_isolate,
AsyncEventDelegate * delegate )

Definition at line 1039 of file debug-interface.cc.

Here is the caller graph for this function:

◆ SetBreakOnNextFunctionCall()

V8_EXPORT_PRIVATE void v8::debug::SetBreakOnNextFunctionCall ( Isolate * isolate)

Definition at line 171 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBreakPointsActive()

void v8::debug::SetBreakPointsActive ( Isolate * v8_isolate,
bool is_active )

Definition at line 377 of file debug-interface.cc.

Here is the caller graph for this function:

◆ SetConsoleDelegate()

V8_EXPORT_PRIVATE void v8::debug::SetConsoleDelegate ( Isolate * v8_isolate,
ConsoleDelegate * delegate )

Definition at line 1115 of file debug-interface.cc.

Here is the caller graph for this function:

◆ SetContextId()

void v8::debug::SetContextId ( Local< Context > context,
int id )

Definition at line 36 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDebugDelegate()

V8_EXPORT_PRIVATE void v8::debug::SetDebugDelegate ( Isolate * v8_isolate,
DebugDelegate * delegate )

Definition at line 1034 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFunctionBreakpoint()

V8_EXPORT_PRIVATE bool v8::debug::SetFunctionBreakpoint ( v8::Local< v8::Function > function,
v8::Local< v8::String > condition,
BreakpointId * id )

Definition at line 1265 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetInspector()

void v8::debug::SetInspector ( Isolate * isolate,
v8_inspector::V8Inspector * inspector )

Definition at line 49 of file debug-interface.cc.

Here is the caller graph for this function:

◆ SetIsolateId()

void v8::debug::SetIsolateId ( v8::Isolate * v8_isolate,
uint64_t id )

Definition at line 1441 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetReturnValue()

void v8::debug::SetReturnValue ( v8::Isolate * v8_isolate,
v8::Local< v8::Value > value )

Definition at line 1245 of file debug-interface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTerminateOnResume()

V8_EXPORT_PRIVATE void v8::debug::SetTerminateOnResume ( Isolate * v8_isolate)

Definition at line 422 of file debug-interface.cc.

Here is the caller graph for this function: