cloudflare / stpyv8

Python 3 and JavaScript interoperability. Successor To PyV8 (https://github.com/flier/pyv8)
Apache License 2.0
440 stars 39 forks source link

Can it support Inspector protocol? #110

Closed Taiung closed 5 months ago

Taiung commented 6 months ago

I want to debug when python executes js code. I checked some documents of V8, but I am not familiar with C++ and cannot implement this function myself. So, I would like to ask if this feature can be added in subsequent updates.

buffer commented 6 months ago

Can you further detail what you would be interested in? Not sure I figured that out. Thanks"

Taiung commented 6 months ago

For example, the v8Py library (https://github.com/tbodt/v8py/blob/master/v8py/devtools.py) provides debugger functionality. With V8's Inspector, you can debug the executing js code through ChromeDevtools. It can also be understood as debugging js code in node.js.

I don’t know if it’s easy to understand expressed like this.

I think this is a very good feature. I'm currently trying to learn the debugger part of v8Py and would like to implement it in STPyV8, but this might be very difficult for me.

buffer commented 5 months ago

One of the main STPyV8 design goals is to keep the code as simpler as possible and to support just key features to execute JavaScript code from Python. Introducing the debugger support would greatly increase the complexity of the project and would not add great value to the project, at least for our own purposes. BTW please feel free to submit some code and we will evaluate together if including that is worth doing. Thanks.