Test your Kotlin code outside of your IDE

Abhilash Das
2 min readDec 31, 2019

While developing android apps, you might run into a situation or you just started learning Kotlin, where you want to run a Kotlin code snippet and verify the output without running the entire application or adding a log at different places.

Let’s discuss some of the options available.

Try the web way:

You can use the online code editor provided by Kotlin team. It’s easy to use and it has some sample exercises which you can run.

Directly from IDE

Android studio has a built-in tool called REPL (Read-Eval-Print-Loop) for running Kotlin code interactively. REPL lets you evaluate expressions and code snippets without creating projects or even functions.

Start REPL from the android studio from Tools -> Kotlin -> Kotlin REPL

--

--