Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odo dev --debug: add flag to run non-default debug command #6212

Open
1 task
rm3l opened this issue Oct 12, 2022 · 1 comment
Open
1 task

odo dev --debug: add flag to run non-default debug command #6212

rm3l opened this issue Oct 12, 2022 · 1 comment
Labels
area/dev Issues or PRs related to `odo dev` kind/user-story An issue of user-story kind lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@rm3l
Copy link
Member

rm3l commented Oct 12, 2022

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 dev should have --debug-command flag that controls what debug command is used to start the application in debug mode.

Links

/kind user-story

@rm3l rm3l added area/debug area/dev Issues or PRs related to `odo dev` needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. labels Oct 12, 2022
@openshift-ci openshift-ci bot added the kind/user-story An issue of user-story kind label Oct 12, 2022
@rm3l rm3l removed the area/debug label Jun 19, 2023
@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 18, 2023
@rm3l rm3l removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 25, 2023
@redhat-developer redhat-developer deleted a comment from github-actions bot Sep 25, 2023
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Sep 25, 2023
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 25, 2023
@rm3l rm3l added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev Issues or PRs related to `odo dev` kind/user-story An issue of user-story kind lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
Status: No status
Development

No branches or pull requests

1 participant