microsoft / microsoft/vscode-spring-boot-dashboard

Dashboard ignores spring.profiles.active configuration and defaults to alphabetically first profile

Open
#397 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug
Dominant language
TypeScript
Stars
73
Forks
38
Avg merge
3d 5h
Merged PRs (30d)
15

Description

Description

The Spring Boot Dashboard ignores the spring.profiles.active configuration set in application.yml and always defaults to the alphabetically first profile (in my case "desa" instead of "test").

Steps to Reproduce
  1. Create a Spring Boot project with multiple profiles: application-desa.yml, application-test.yml, application-prod.yml
  2. Set default profile in application.yml:
    spring:
      profiles:
        active: test
    
    

Configure .vscode/settings.json:
{
"spring-boot.ls.java.vmargs": ["-Dspring.profiles.active=test"],
"java.debug.settings.vmArgs": "-Dspring.profiles.active=test"
}

Start application from Spring Boot Dashboard using "Run" or "Debug"
Expected Behavior
Application should start with profile "test" as configured in application.yml

Actual Behavior
Application always starts with profile "desa" (alphabetically first profile), ignoring all configuration

Workaround
Using "Run with profile" or "Debug with profile" works, but requires manual selection every time. It does not remember last used.

Environment
VSCode Version: 1.109.5
Spring Boot Dashboard Extension Version: 0.14.0
OS: Windows 11
Java Version: 21

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

Reproduce the issue with application.yml profiles desa, test, and prod, then start from the Spring Boot Dashboard Run and Debug actions. Compare those actions with Run with profile and Debug with profile, and verify that the default launch uses spring.profiles.active=test rather than the alphabetically first profile.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.