Currently, I am endeavoring to grasp the functioning of the Debug object in V8 for debugging javascript within an embedded-javascript C++ application.
After invoking v8::Debug::SetDebugEventListener
and specifying a callback function, I proceed to execute v8::Debug::GetDebugContext
to obtain a debug context. Following this, I typically run: Debug.scripts()
Upon printing the output of this call from within the C++ code, the resulting data is as follows:
[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
My ultimate aim is to establish a breakpoint at a designated line number in a script; however, I am encountering various hurdles even with basic operations.
Despite receiving callbacks from my debug event listener, the input parameter data within these callbacks appears to be nonsensical or unclear.
{script_: {context_: {data_: undefined, handle_: 0, type_: "context"}, handle_: 1, script_: {}, type_: "script"}, type_: 4}
{break_id: 2, selected_frame: 0}
Your assistance would be greatly appreciated.