Enable Debug of V8 scripts and use a remote debugger.

117 views
Skip to first unread message

Richard Pike

unread,
Oct 18, 2016, 4:27:27 AM10/18/16
to v8-users
I know this question has been somewhat answered before but I am scouting round for some more definitive pointer's on how to get this done.  I currently Run many v8 isolate on many threads.  Each thread runs its own set of scripts within a single isolate.

I want to attach a debugger to one (or more) of the isolates.  Is there a way (like the JVM) to turn on debugging (activate a TCP port) and attach an external debugger?

Richard 

Zac Hansen

unread,
Oct 18, 2016, 4:39:48 AM10/18/16
to v8-users
bad news: there is currently no way to do this.

good news: there is active work on it.

From a thread I was on a week ago or so: 
> The V8 inspector migration is almost complete--the majority of work has been done. You can follow development in the source repo and via this bug. Upon completion we will document usage on the V8 GitHub wiki.

Zac Hansen

unread,
Oct 18, 2016, 4:41:01 AM10/18/16
to v8-users
Looking at the bug, less than 2 hours ago I see:

[inspector] Turn on inspector by default

Not sure if that means what I think it means, but maybe it's ready to go?

Yang Guo

unread,
Oct 20, 2016, 2:39:38 AM10/20/16
to v8-users
You can take a look at test/inspector/inspector-test.cc to see how to attach an inspector client to a V8 context. By patching this through to a socket, you could use Chrome to debug.
Reply all
Reply to author
Forward
0 new messages