`odo dev --debug`: add flag to run non-default debug command
User Story
- As an odo user
- I want to be able to execute an alternative debug command instead of the default one
- So that I can debug my app running in a different mode (different configuration, flags, etc..) and without modifying the default debug command.
This is similar to #5775, where I am able to execute an alternative run command instead of the default one.
Example:
SpringBoot devfile has the following default debug command.
- exec:
commandLine: java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n
-jar target/*.jar
component: tools
group:
isDefault: true
kind: debug
workingDir: ${PROJECT_SOURCE}
id: debug
In some situations, I want to run my Spring Boot application with a different profile.
This can be done by setting the spring.profiles.active=postgres JVM system property to the java command.
Currently, I have to edit the commandLine in order to be able to execute with a different profile.
Instead of that, it would be nice to be able to add an extra (non-default) debug command like this:
- exec:
commandLine: java -Dspring.profiles.active=postgres -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n
-jar target/*.jar
component: tools
group:
isDefault: false
kind: debug
workingDir: ${PROJECT_SOURCE}
id: debug-with-postgres
And then simply execute odo dev --debug --debug-command debug-with-postgres; when I want to switch back to using the default profile, I stop running odo dev command and start it again, but this time without --debug-command flag.
Acceptance Criteria
- [ ]
odo devshould have--debug-commandflag that controls what debug command is used to start the application in debug mode.
Links
- Related Epic (mandatory):
- Related to #5775 and #5776
/kind user-story
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.