4

I'm integrating V8 JavaScript engine inside my C++ application. What are the current options to debug JavaScript code executed inside V8 engine?

I would like to use Visual Studio Code with chrome-debug extension https://github.com/Microsoft/vscode-chrome-debug but can't figure out how to enable remote debugging inside V8 engine?

PS: In V8's embedder guide https://github.com/v8/v8/wiki/Debugging%20Protocol I can see message debug protocol for out-of-process debugging is no longer maintained.

1 Answer 1

3

Because vscode-chrome-debug support Node.js debugging I decided to use node.js debug-agent code to expose TCP port (5858 by default) for V8 debug protocol https://github.com/nodejs/node/blob/master/src/debug-agent.cc

Sign up to request clarification or add additional context in comments.

2 Comments

Was it difficult to integrate with a standalone non-node app?
Not really. We just take node, turn project artifact to dll library add javascript entry point via function called from main app. You can look at our efforts here: github.com/BazisSoft/node-delphi. Feel free to ask Let0s for assistance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.