fwcd / fwcd/vscode-kotlin

What to specify for mainClass when there is none?

Open
#84 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
359
Forks
56
PR merge metrics
No merged PRs in 30d

Description

### Motivation
It would be helpful if the tooltip showed what to do when there is no main class.

### Description
I created a new directory, opened it, and created "main.kt"

```
fun main(args: Array) {
println("hello?");
}
```

Then, I selected the default "kotlin" launch script, and it had "mainClass" setting. But my file has no main class. Tried ` "mainClass": "${workspaceFolder}\\main.kt"`, but it did not work.

### Alternatives considered
Creating a class. But that's cumbersome.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the default "kotlin" launch script and its `mainClass` setting, using the reported `main.kt` example as the reproduction case. Trace how the tooltip presents this setting and determine what guidance is needed when the entry point is a top-level Kotlin `main` function. Done means the tooltip explains the valid configuration and the launch setup works for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, vscode
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.