Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does NIM adaptable to other application than Node #79

Closed
daduroy opened this issue May 18, 2020 · 7 comments
Closed

Does NIM adaptable to other application than Node #79

daduroy opened this issue May 18, 2020 · 7 comments

Comments

@daduroy
Copy link

daduroy commented May 18, 2020

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

@june07
Copy link
Owner

june07 commented May 18, 2020 via email

@daduroy
Copy link
Author

daduroy commented May 18, 2020

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

@june07
Copy link
Owner

june07 commented May 18, 2020

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

@daduroy
Copy link
Author

daduroy commented May 18, 2020

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

@june07
Copy link
Owner

june07 commented May 18, 2020

Yes some customization may be needed.

@daduroy
Copy link
Author

daduroy commented May 19, 2020

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

@daduroy
Copy link
Author

daduroy commented May 19, 2020

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.

@june07 june07 closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants