J2V8
J2V8 copied to clipboard
How to debug javascript on Android with chrome developer tools
@irbull We have integrated J2V8 into our project, we're very appreciate that you provide so excellent framework for us. But now we're facing one problem that is how to debug javascript on Android with chrome developer tools. Therefore we're grateful if you do us favor to provide demo code that how to debug javascript in Android with chrome developer tools. We have written several thousand javascript code, it's inefficient to solve bug without debug tool.
Thanks lot.
You can use this project to quickly run your JS in vanilla V8 and debug with Chrome DevTools. Clone the repo and build a binary for your platform. Use the binary to run your code.
$ out/Release/node -inspect --inspect-brk my_js_file.js
Now go to chrome://inspect in chrome, and choose "Open dedicated DevTools for Node" It will open Chrome DevTools and break at the first line in my_js_file.js
In case, you want to use the console for calling functions - append a setInterval(function(){}, 1000*60*24) and the script will keep running until you exit your node process.