Here's what I have already:
v8::Debug::EnableAgent("something", 12337, false);
v8::Debug::SetDebugEventListener2(&debugEventHandler);
std::wstring str =
L"{\"seq\":1,\"type\":\"request\",\"command\":\"setbreakpoint\",\"arguments\":{\"type\":\"script\",\"target\":\"my.js\",\"line\":7}}";
v8::Debug::SendCommand((uint16_t *)str.c_str(), str.length(), new
v8::Debug::ClientData());
v8::Debug::ProcessDebugMessages();
script->Run();
v8::Debug::DisableAgent();
(full code at http://pastebin.com/ykkjAXDD)
I've tried all sorts of extra functions and different ordering in calling
them, but none seemed to work. I must be missing something basic.
Thanks!
- Evan
On Thursday, June 21, 2012 12:42:38 PM UTC-7, Evan Ovadia wrote:
>
> Hi everyone, given the following script:
>
> print("hello");
> print("world");
>
> I'm trying to feed it into v8, then be able to run my own c++ code after
> print("hello") and before print("world").
>
> It seems like enabling the debugger and using its breakpoint capabilities
> would work well. I can simply fire up the debugger using
> v8::Debug::EnableAgent(), set a breakpoint to line 2 of this script,
> register an event listener, and run my code.
>
> However, this isn't working. Are there any simple examples anywhere for
> doing this?
>
> Thanks!
>
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users