V8 Project
|
#include <v8-debug.h>
Classes | |
class | ClientData |
A client object passed to the v8 debugger whose ownership will be taken by it. More... | |
class | EventDetails |
An event details object passed to the debug event listener. More... | |
class | Message |
A message object passed to the debug message handler. More... | |
Public Types | |
typedef void(* | EventCallback) (const EventDetails &event_details) |
Debug event callback function. More... | |
typedef void(* | MessageHandler) (const Message &message) |
Debug message callback function. More... | |
typedef void(* | DebugMessageDispatchHandler) () |
Callback function for the host to ensure debug messages are processed. More... | |
Static Public Member Functions | |
static bool | SetDebugEventListener (EventCallback that, Handle< Value > data=Handle< Value >()) |
static void | DebugBreak (Isolate *isolate) |
static void | CancelDebugBreak (Isolate *isolate) |
static bool | CheckDebugBreak (Isolate *isolate) |
static void | DebugBreakForCommand (Isolate *isolate, ClientData *data) |
static void | SetMessageHandler (MessageHandler handler) |
static void | SendCommand (Isolate *isolate, const uint16_t *command, int length, ClientData *client_data=NULL) |
static Local< Value > | Call (v8::Handle< v8::Function > fun, Handle< Value > data=Handle< Value >()) |
Run a JavaScript function in the debugger. More... | |
static Local< Value > | GetMirror (v8::Handle< v8::Value > obj) |
Returns a mirror object for the given object. More... | |
static void | ProcessDebugMessages () |
Makes V8 process all pending debug messages. More... | |
static Local< Context > | GetDebugContext () |
Debugger is running in its own context which is entered while debugger messages are being dispatched. More... | |
static void | SetLiveEditEnabled (Isolate *isolate, bool enable) |
Enable/disable LiveEdit functionality for the given Isolate (default Isolate if not provided). More... | |
Definition at line 29 of file v8-debug.h.
typedef void(* v8::Debug::DebugMessageDispatchHandler) () |
Callback function for the host to ensure debug messages are processed.
Definition at line 157 of file v8-debug.h.
typedef void(* v8::Debug::EventCallback) (const EventDetails &event_details) |
Debug event callback function.
event_details | object providing information about the debug event |
A EventCallback2 does not take possession of the event data, and must not rely on the data persisting after the handler returns.
Definition at line 142 of file v8-debug.h.
typedef void(* v8::Debug::MessageHandler) (const Message &message) |
Debug message callback function.
message | the debug message handler message object |
A MessageHandler2 does not take possession of the message data, and must not rely on the data persisting after the handler returns.
Definition at line 152 of file v8-debug.h.
|
static |
Run a JavaScript function in the debugger.
fun | the function to call |
data | passed 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. |
Definition at line 6972 of file api.cc.
References v8::internal::Debug::Call(), v8::internal::Isolate::debug(), ENTER_V8, EXCEPTION_BAILOUT_CHECK, EXCEPTION_PREAMBLE, v8::internal::Isolate::factory(), v8::Handle< T >::IsEmpty(), v8::internal::Isolate::IsInitialized(), ON_BAILOUT, v8::Utils::OpenHandle(), and v8::Utils::ToLocal().
|
static |
Definition at line 6937 of file api.cc.
References v8::internal::Isolate::stack_guard().
Definition at line 6943 of file api.cc.
References v8::internal::Isolate::stack_guard().
|
static |
|
static |
Definition at line 6949 of file api.cc.
References v8::internal::Isolate::debug(), and v8::internal::Debug::EnqueueDebugCommand().
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.
Definition at line 7028 of file api.cc.
References ENTER_V8, and v8::Utils::ToLocal().
|
static |
Returns a mirror object for the given object.
Definition at line 6994 of file api.cc.
References v8::internal::Handle< T >::cast(), v8::internal::Isolate::debug(), v8::internal::Debug::debug_context(), ENTER_V8, v8::EscapableHandleScope::Escape(), EXCEPTION_BAILOUT_CHECK, EXCEPTION_PREAMBLE, v8::internal::Isolate::factory(), v8::internal::Object::GetProperty(), v8::Handle< T >::IsEmpty(), v8::internal::Isolate::IsInitialized(), v8::internal::Debug::Load(), name, ON_BAILOUT, STATIC_CHAR_VECTOR, and v8::Utils::ToLocal().
|
static |
Makes V8 process all pending debug messages.
From V8 point of view all debug messages come asynchronously (e.g. from remote debugger) but they all must be handled synchronously: V8 cannot do 2 things at one time so normal script execution must be interrupted for a while.
Generally when message arrives V8 may be in one of 3 states:
Technically this method in many senses is equivalent to executing empty script:
"Evaluate" debug command behavior currently is not specified in scope of this method.
|
static |
Definition at line 6962 of file api.cc.
References v8::internal::Isolate::debug(), and v8::internal::Debug::EnqueueCommandMessage().
|
static |
Definition at line 6917 of file api.cc.
References v8::internal::Isolate::debug(), ENTER_V8, v8::internal::Isolate::factory(), FUNCTION_ADDR, NULL, ON_BAILOUT, v8::Utils::OpenHandle(), and v8::internal::Debug::SetEventListener().
Referenced by v8::Shell::InstallUtilityScript().
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.
Definition at line 7035 of file api.cc.
References v8::internal::Isolate::debug(), and v8::internal::Debug::set_live_edit_enabled().
|
static |
Definition at line 6955 of file api.cc.
References v8::internal::Isolate::debug(), ENTER_V8, and v8::internal::Debug::SetMessageHandler().