V8 have got a remote debugger service which can be activated through the
debugger API v8::Debug::EnableAgent(). This will start a TCP/IP listener on
the port passed. To debug you then need some application which can talk the
debugger protocol - D8 can do that. To try it out you can use D8 as both the
debugger and the embedding application hosting JavaScript to be debugged.
Run

$ ./d8 --debugger-agent

to start D8 with the debugger agent enabled, and run

$ ./d8 --remote-debugger

to connect the second D8 as the remote debugger to the first.

In the first D8 type the statement 'debugger' and you will see control
reaches the debugger (causing an uncaught exception will also do that).

The remote debugger part of D8 is a bit rough and sometimes the prompt
'dbg>' is not displayed. Also there is currently no way to break into
running JavaScript.

The debugger protocol is documented on
http://code.google.com/p/v8/wiki/DebuggerProtocol. When using the debugger
agent the JSON messages are wrapped with a simple HTTP like header.

On Fri, Sep 4, 2009 at 09:06, ondras <[email protected]> wrote:

>
> Hi,
>
> I am a bit confused regarding the built-in V8 debugger service. If I
> am not mistaken, every V8 implementation contains a debugging server,
> which can provide debugging data to a client via the JSON debugger
> protocol. However, how can one activate/enable this service? Or am I
> completely wrong on this one?
>
>
> Thanks a lot for assistance,
> Ondrej
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to