Hi Team, We are using KJS for our web app. In our ...
# javascript
g
Hi Team, We are using KJS for our web app. In our case we had to suspend function. But when we use suspend function, we could not inspect variables in chrome. Its affects our development and a deal breaker too. Can someone suggest fix/workaround for this. https://youtrack.jetbrains.com/issue/KT-60837/KJS-Debugger-Could-not-inspect-evaluate-vairables-in-Chrome
t
cc @Artem Kobzar
a
Unfortunately, this is the current limitation of the SourceMap format. With the regular function, it works fine just because all the variables inside the regular functions are compiled into JS variables with the same name, but with the suspend function, some of the variables are translated into StateMachine's fields. The situation with the debuggability of suspend functions should be much better when the ticket (https://youtrack.jetbrains.com/issue/KT-63038) arrives in the next version of the compiler.
I'm working to bring it in 2.0 version
👍 4
gratitude thank you 2
For now, you could try to inspect such variables by
this
object fields
e
Do you aim at supporting this for all module systems or only for ES?
g
Thanks a lot 👍
a
With all module systems.