Debug with profile. The VS" /> Debug with profile. The VS" /> Debug with profile. The VS"/>

How to add Active Spring Profiles to VSCODE (Spring boot dashboard extension)

1.4k Views Asked by At

I am trying to "Debug with profile" my springboot application, in VSCode's Spring Boot Dashboard: Right click on the App -> Debug with profile. The VSCode shows a popup to Select Active Profiles, but the profile list is empty. How can I configure the active profiles to be used by VSCode/application, in this case?

enter image description here

I've tried to find some configuration option in vscode, ctrl + shift + p, etc, without success.

1

There are 1 best solutions below

0
Sander van der Heijden On

It seems like the profile list is filled based on application configuration files that are present under the src/main/resources folder. If for example the following files are present:

  • application.yaml
  • application-dev.yaml
  • application-tst.yaml

The dev and tst profiles will become available in the list.

See also: https://github.com/microsoft/vscode-spring-boot-dashboard/pull/309