Debugging js bytecode with V8 engine

546 views Asked by At

I'm using the v8 library to run js code in my project. And I want to implement controlled execution of the compiled js code. I would like to be able to control the execution of bytecode step by step. From one instruction to another. Is it possible at all?

1

There are 1 answers

0
Sanjeev On

Javascript is an interpreted language, not a compiled language. V8 is the javascript engine of google and present in chrome browser. Web page is generally constructed using HTML, Javascript and CSS and web browser is enough to do HTML rendering and Javascript interpretation. You don't need to even installed JVM to render the page which contains Javascript.

V8 is written in C++ and you can debug it, even you can extend your javascript by exposig javascript object and extend existing JS object(like document etc) implementing the C++ binding in V8. Hope it is making clear to you.

If you are doing server site scripting using JSP then the compilation will come in place and you will get the .java files containing the byte code and the JVM and other tools like Javac will come in picture.