This repository was archived by the owner on Feb 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,7 +239,37 @@ variable to the JSON file path instead of adding the
239239
240240### Other JVM Languages
241241
242- Starting with Java Cloud Debugger version 2.13, you can use the debugger to
243- debug Scala applications. You can take snapshots in both ` .scala ` and ` .java `
244- source files, however snapshot expressions and conditions must always be written
245- using the Java programming language syntax.
242+ #### Scala
243+
244+ Debugging Scala applications is supported; however, expressions and conditions
245+ conditions must be written using the Java programming language syntax.
246+
247+ #### Kotlin
248+
249+ Debugging Kotlin applications is supported; however, expressions and conditions
250+ conditions must be written using the Java programming language syntax.
251+
252+ Many Kotlin-specific features can be used in conditions and expressions with
253+ simple workarounds:
254+
255+ ``` Kotlin
256+ // Main.kt
257+ private fun getGreeting () {
258+ return " Hello world!"
259+ }
260+ class Main {
261+ companion object {
262+ fun welcome () {
263+ return getGreeting()
264+ }
265+ }
266+ }
267+ ```
268+
269+ Package-level functions can be accessed by qualifying them with the name of the
270+ file and a ` Kt ` suffix. For instance, the ` getGreeting ` function above can be
271+ used in an expression as ` MainKt.getGreeting() `
272+
273+ Companion object methods can be accessed by qualifying them with the ` Companion `
274+ keyword. For instance, the ` welcome ` function above can be used in an expression
275+ as ` Main.Companion.welcome() `
You can’t perform that action at this time.
0 commit comments