Support for APIs that expose the internal state of the VM #668
Replies: 1 comment
-
|
I haven't got any plans for supporting debugging, main focus being performance. Because of that implementing debugger would present some challenges, even if you expose internal structures. For instance, for purely stack variables that are never referenced dynamically names aren't stored. Another thing with exposing internal structures and APIs is that it limits the ability to make changes without breaking the APIs, that's why I try to keep public API to the minimum. Having said that I'm not against contributions as long as they do not impact perfomance in general case (i.e. when debugging is disabled) and the API are documented as not providing any sort of backward compatibility guarantees. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we are building a wrapper around Goja and building a script debugger. However, we would like to show state of the code (local variables, the environment stack etc). However as of today, Goja does not provide user APIs to get the local variables/lexical environment at a point in time.
An example of how it could be used would be as following.
I understand one way we can do this is by injecting the locals into the globals object at every function call but it would be good if this could be done natively. Was wondering if there was plans for support? Or if contributions on this part would be accepted?
Beta Was this translation helpful? Give feedback.
All reactions