Closed ptomato closed 1 year ago
Just had a chance to run this PR and it's looking good!🎉 I was able to add logs of different kinds and see them in the Chrome console as well as jump to source.
I did run into a few issues I'll note here:
Thanks for the testing! I've fixed the crash when typing into the Chrome console, and updated this branch. I haven't managed to reproduce the other one yet.
Description
This PR updates the V8 inspector headers on the 10.3 branch to the correct headers from V8 10.3, removes ones that are no longer part of V8, and moves NativeScript-specific ones out of the V8 folders so they don't accidentally get deleted when updating V8 sources in the future.
The PR adds the inspector functionality back in, which was removed in the V8 update. Most of the inspector agents are commented out or not compiled, but this re-implements the Console inspector using the CRDTP's Runtime protocol. (It was previously implemented using the Log protocol, which is no longer part of V8.)
This is a huge pull request, but most of it is just V8 header updates. I'd recommend reviewing it commit by commit. Each commit message has a description of what is going on in that commit.
Related Pull Requests
1743
1750
Does your pull request have unit tests?
No unit tests. (I'm not sure how to test the integration between runtime and Chrome devtools in an automated way.) Here's my steps for testing this:
console.log()
and/or otherconsole
statements to theonClick()
handler intest-app/app/src/main/assets/app/MyActivity.js
.ns debug android --start
in the test-app folder. (You'll need to add fake project files to test-app for this to work. e.g, as in https://github.com/NativeScript/android/pull/1748/commits/a19acb5eb676c66f783b3ee4d4aa36e2751ec452)devtools://devtools/bundled/inspector.html?ws=localhost:40000
. Open this URL in Chrome.console
statements appear both in the terminal and in the Chrome devtools.