june07/NiM

Does NIM adaptable to other application than Node

Closed this issue · 7 comments

Hello
I'm currently integrating V8Inspector in my company application that already embeds V8.
I'm currently facing the issue your plugin NIM has already solved for Node : how to simplify the start of a debug session ?
Do you think it's possible to use NIM to automate the launching of CDT in my application?
Thanks and regards
Aligre

Yes of course.
I've used V8Inspector sample (https://github.com/hsharsha/v8inspector) to get the principles of inspector integration.
The current steps are not frozen, if necessary I can modify our code to be compliant with an existing tool like yours.
Here the steps of a simple scenario

  1. a caller of our V8 integration creates a V8 isolate object and start a debug session ; he's blocked until its V8 session will be connected to CDT
  2. in the console, our V8 integration wrotes the URL to be opened in chrome ; something like chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=localhost:52014/00750028-0079-40c5-8059-000300d600b5
  3. the user creates a new tab in chrome with this adress then press enter.
  4. the communication between V8 and CDT is now established and the debug session is started.
  5. with the main debug mode (it exists another mode which not blocks the JS execution) the execution will stop In CDT at the first JS statement
    Regards

So my answer to your original question is a more solid yes in this case.

good news. I haven't tested but I guess NIM wont work without any customization.

Yes some customization may be needed.

OK. I'm starting to test NIM. If you have any hints that may help dont hesitate

I've understood how NIM connect to Node or other process, it's sending http request Get JSON on the specified port. Then to be NIM compatible I think I have only to fix the port number, as in node, and implements the JSON http answer.