How to use Chrome Dev Tools to debug a script in d8

516 views
Skip to first unread message

DaManuell

unread,
Apr 8, 2019, 7:23:18 AM4/8/19
to v8-users
I successfully built d8.exe from sources

I made a simple JavaScrit file called test.js:

function test( obj ) {
  return obj.prop + obj.prop;
}

I ran d8.exe with the command line bellow:

d8 --enable-inspector --shell test.js

I am able to call my test function from the d8 shell interface:

V8 version 7.5.0 (candidate)
d8> test( { prop:'a'} )
"aa"
d8> test( { prop:'ab'} )
"abab"
d8>

Can I, and if so, how, debug test.js from the Chrome Dev Tools?

Mathias Bynens

unread,
Apr 8, 2019, 7:28:34 AM4/8/19
to v8-users
Does the documentation help? https://v8.dev/docs/inspector

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DaManuell

unread,
Apr 8, 2019, 8:47:52 AM4/8/19
to v8-users
Not really. Too succinct. Not clear what is documented here.


Le lundi 8 avril 2019 13:28:34 UTC+2, Mathias Bynens a écrit :
Does the documentation help? https://v8.dev/docs/inspector

On Mon, Apr 8, 2019 at 1:23 PM DaManuell <manuel...@gmail.com> wrote:
I successfully built d8.exe from sources

I made a simple JavaScrit file called test.js:

function test( obj ) {
  return obj.prop + obj.prop;
}

I ran d8.exe with the command line bellow:

d8 --enable-inspector --shell test.js

I am able to call my test function from the d8 shell interface:

V8 version 7.5.0 (candidate)
d8> test( { prop:'a'} )
"aa"
d8> test( { prop:'ab'} )
"abab"
d8>

Can I, and if so, how, debug test.js from the Chrome Dev Tools?

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.

DaManuell

unread,
Apr 11, 2019, 7:25:51 AM4/11/19
to v8-users
Ok. That was a dumb question. In order to connect CDT to a program embedding V8, that program first has to implement the back-end WebSocket.
Doing that with d8 at a starting point seems a bad idea.
Reply all
Reply to author
Forward
0 new messages