microsoft / microsoft/vscode-spring-boot-dashboard
Unable to start app from dashboard when mainClass outside/different than project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 73
- Forks
- 38
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 15
Description
Hello,
I am getting No main class is found. for apps in my dashboard where the mainClass is different from current application. Version is v0.6.0
The below is located in my Workspace Settings launch configurations. This application runs properly in the Dashboard:
{
"type": "java",
"name": "proxy",
"request": "launch",
"cwd": "${workspaceFolder:proxy}",
"console": "internalConsole",
"mainClass": "com.project.myapp.ProxyApplication", // same as project
"projectName": "proxy",
"args": "",
}
The below application does NOT run in the Dashboard with message No main class is found.:
{
"type": "java",
"name": "user-api",
"request": "launch",
"cwd": "${workspaceFolder:user-api}",
"console": "internalConsole",
"mainClass": "com.project.myapp.BaseApplication", // different than project
"projectName": "user-api",
"args": ""
}
Notice that the mainClass in the above is different than the project. Both are running fine in the Run and Debug pane with F5.
What could be the reason that Debugger for Java is able to resolve the main class while Spring Boot Dashboard is unable to find the main class?
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Spring Boot Dashboard handling of Workspace Settings launch configurations, then compare its main-class resolution with the Run and Debug pane using F5. Reproduce the difference between matching and different projectName/mainClass values; done when the Dashboard launches the latter application without reporting that no main class is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100