Orange Lux
Orange Lux

Reputation: 2007

Is there a way to debug a kotlin project from the command line?

I can run and debug the project by right-clicking on the main application file and choosing "debug msApplication.main()"

But is it possible to run this debug state in the command line ?

Like I'm doing for the "normal" run with this command ?

./gradlew bootRun --args='--spring.profiles.active=dev'

Upvotes: 0

Views: 54

Answers (1)

Geba
Geba

Reputation: 1122

Run your app using:

./gradlew bootRun --debug-jvm

In IntelliJ IDEA create a Remote JVM Debug configuration and run it.

enter image description here

The process is identical to debugging a Java Spring Boot app, so the current question might be considered as a duplicate of how to debug spring application with gradle

Note: you can add other args to the command

./gradlew bootRun --debug-jvm --args='--spring.profiles.active=dev'

Upvotes: 0

Related Questions