Hello, i have a similar problem. 
I embedded v8 in my c++ apllication and users can run small js scripts.
But this is a windows program. All ive seen so far does not work with 
windows. 
Joe - will the approach you describe most likely work with windows?

Regards
Stefan


Am Dienstag, 17. September 2019 09:03:22 UTC+2 schrieb Joe Lewis:
>
> Thanks, Gautham! 
>
> I had trouble installing that specific version of V8 (5.9), for my 
> platform(MacOS Mojave). I finally had to give up getting it to work. 
>
> However, I took the hackier route and got things to work. Since NodeJS 
> already supports Chrome DevTools integration, I forked NodeJS and tweaked 
> it to run my JS in vanilla V8 environment. 
>
> To folks coming from Google: here's the fork - 
> https://github.com/joelewis/node
> Build a node binary from that fork and use
>
> $ /out/Debug/node --inspect --inspect-brk js_code.js
>
> This will open Chrome DevTools and break on the source's first line 
> (running in pure V8, with no NodeJS injections like require, module or 
> exports)
> For the curious here's the hacky commit: 
> https://github.com/joelewis/node/commit/088dee23334fb9c45709c046c4a99521517ad27f
>
>
> Thanks
> Joe
>
> On Monday, 20 May 2019 19:36:00 UTC+5:30, Gautham B A wrote:
>>
>> It tries to look for libraries in */usr/local/lib* and headers in 
>> */usr/local/include* . So, just do a *$ make install* after building v8.
>>
>> On Monday, 20 May 2019 19:25:08 UTC+5:30, Joe Lewis wrote:
>>>
>>> Thanks a lot Gautham, Ben! Looks like exactly what I need. 
>>>
>>> Being a complete C++/CMake newbie, I can't get the project to build to 
>>> correctly though. 
>>>
>>> Here's the error message I receive when I do cmake ..
>>>  
>>>
>>> CMake Error at FindV8.cmake:40 (MESSAGE):
>>>
>>>   Can't build v8inspector without V8
>>>
>>> Call Stack (most recent call first):
>>>
>>>   CMakeLists.txt:15 (INCLUDE)
>>>
>>>
>>>
>>> -- Configuring incomplete, errors occurred!
>>>
>>> See also 
>>> "/Users/joe-2744/v8/v8inspector/build/CMakeFiles/CMakeOutput.log".
>>>
>>> I've cloned v8 source in a directory from which I build v8.
>>> I've cloned https://github.com/hsharsha/v8inspector in a separate 
>>> directory and I'm trying to execute cmake. 
>>>
>>> Is there a way to tell FindV8.cmake, where to look for v8 header files 
>>> and libs in my system?
>>>
>>>
>>> Thanks,
>>> Joe
>>>
>>>
>>> On Monday, 20 May 2019 10:11:24 UTC+5:30, Gautham B A wrote:
>>>>
>>>> Checkout this project - https://github.com/hsharsha/v8inspector . It 
>>>> does exactly what you're looking for. We're using the same at Couchbase 
>>>> and 
>>>> it's working absolutely fine.
>>>>
>>>> On Sunday, 19 May 2019 13:50:30 UTC+5:30, joe lewis wrote:
>>>>>
>>>>> A bit more reading and I understood how dumb the question is. I'd like 
>>>>> to validate if my current understanding is correct.
>>>>>
>>>>> V8 is more than the shell binary that comes with the build. V8 
>>>>> provides extensive C++ APIs to compile Javascript source code from other 
>>>>> programs (usually termed as embedding V8). 
>>>>> So, to enable chrome devtools as debugging front-end I have to write a 
>>>>> program (C++ wrapper or such) that communicates through web-sockets, 
>>>>> debugging-protocol messages back and forth from the front-end to v8. Or 
>>>>> did 
>>>>> I get it completely twisted?
>>>>>
>>>>> If it did make sense, is there a project that has already implemented 
>>>>> such standalone program that statically links to V8 and exposes a 
>>>>> remote-debugging session? If nothing like that exists I'd like to pursue 
>>>>> that direction and publish a simple project that spins up a V8 instance 
>>>>> and 
>>>>> starts a chrome remote-debugging session.
>>>>>
>>>>> Full-stack developer here, with almost no experience working with 
>>>>> system software. Please let me know if I got it all completely wrong. 
>>>>>
>>>>> Thanks,
>>>>> Joe
>>>>>
>>>>>
>>>>> On Sun, 19 May 2019 at 12:19, Joe Lewis <lewis...@gmail.com> wrote:
>>>>>
>>>>>> I'm pretty sure that my understanding of the entire topic is fairly 
>>>>>> limited and this is not going to be easy. Here's what I'm looking for:
>>>>>>
>>>>>> We're trying to re-use the product's javascript code across browser, 
>>>>>> server & devices. We've settled on running v8 with Java bindings  (J2v8) 
>>>>>> for the server and android devices.
>>>>>>
>>>>>> While developing I'd like to setup a chrome devtools environment and 
>>>>>> test my JS code as if it's running on V8 directly. I understand I can 
>>>>>> spin 
>>>>>> up a chrome instance with --remore-debugging-port option and connect 
>>>>>> a devtools instance to that chrome for browser and for node --inspect 
>>>>>> does something similar. Is there an equivalent for a v8 shell?
>>>>>>
>>>>>> Is there any way I can do something like
>>>>>>
>>>>>> bash-$ ./d8 --remote-debugging-port=9222
>>>>>>
>>>>>> and connect a chrome devtools instance to that shell?
>>>>>>
>>>>>> Can somebody point me in the right direction?
>>>>>>
>>>>>> -- 
>>>>>> -- 
>>>>>> 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.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/v8-users/0bb21c0a-a1fa-4b70-8854-94f34061b4ba%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/v8-users/0bb21c0a-a1fa-4b70-8854-94f34061b4ba%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>

-- 
-- 
v8-users mailing list
v8-users@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/e0998917-0fd1-4414-a855-f391aaad9f0e%40googlegroups.com.

Reply via email to