microsoft / microsoft/vscode-spring-boot-dashboard

Unable to start app from dashboard when mainClass outside/different than project

Open
#201 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug discussion
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.