You are currently viewing How to debug Kotlin Native in IDEA with args?

How to debug Kotlin Native in IDEA with args?

I’m learning Kotlin and getting everything set up has been… well pretty annoying.

I downloaded Idea because setting up VS to write Kotlin was less than intuitive. I started a new Kotlin Native project. Idea didn’t create a run configuration so I go to create one. I select Kotlin, then try to find the main class. Tutorials show using MainKT, but that doesn’t exist and the search wasn’t able to find any classes at all.

If I click the green Play button next to the main function it will create a gradle config runDebugExecutableNative, which seems to work but doesn’t have any intuitive way to add args. The program I’m porting to kotlin to learn the language requires command line args.

I’ve used many other languages in the past and I feel like I must be missing something obvious if Kotlin is this obtuse to get set up.

submitted by /u/CaptainRingworm
[link] [comments]