So basically there are two ways of handling debugging with V8
1. Handle debugging inside the VM using callback
2. Handle debugging outside the VM using the debugger protocol.
The d8 developer shell supports both modes of operation.
Running
$ ./d8 --debugger
Will enable the debugging inside the VM. Typing debugger (the debugger statement) will enter the debugger.
Running
$ ./d8 --debugger-agent
Will enable debugging through a socket connection. Typing debugger now will have no effect as no debugger is attached. d8 can also act as a remote debugger, so running
$ ./d8 --remote-debugger
in a separate shell will connect to the first V8. Now typing debugger in d8 will enter the debugger in the remote debugger.
Regards,
Søren