I'm trying to learn how to use the Debug object in V8 to debug javascript in an embedded-javascript c++ application.
I've called v8::Debug::SetDebugEventListener
and set a callback. I then call v8::Debug::GetDebugContext
to get a debug context, and then run something like: Debug.scripts()
If I print the results of that call from C++, I get:
[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
What I actually want to do is set a breakpoint for a given line number in a script, but can't get even the most basic things working.
I get callbacks to my debug event listener, but the callback input parameter (non-user-provided) data doesn't make any sense to me, either.
{script_: {context_: {data_: undefined, handle_: 0, type_: "context"}, handle_: 1, script_: {}, type_: "script"}, type_: 4}
{break_id: 2, selected_frame: 0}
Thank you.