Unable to inspect the variables for kotlin code during debugging inside Xcode with xcode-kotlin plugin enabled #113
Unanswered
murali-discovery
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
I am working on a multiplatform project and was exploring the debugging of kotlin code from the Xcode with the help of
xcode-kotlin plugin. I have generated the xcframework from kotlin code and have integrated into iOS app.
I have also installed the xcode-kotlin plugin and was able to add the same kotlin source code(used for xcframework generation) into the XCode.
I was also able to put the breakpoints in the kotlin source code directly and was able to see the debugger getting attached and stopped at the breakpoints BUT when tried to inspect/evaluate the variables I was unable to get any output from these and an error is getting printed.
But interestingly I have observed that for the variables declared with var I can see the evaluation is happening and the values getting populated but those declared with val the error gets printed.
I have quickly tried it on a sample app, which has only one module with one class and which has only one function that contains some variables declaration with var and val, and have observed the same behaviour.
Attaching a screenshot for your quick reference:
Can you please let us know if the xcode-kotlin plugin supports only variables declared with var or if I am not using the plugin in a correct way.
Your help here would be greatly appreciated.
I have attached these sample projects( both android(KMP code) and iOS) for your reference.
iOS_Code.zip
KMP_Code.zip
Beta Was this translation helpful? Give feedback.
All reactions