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

"Apache Camel" devfile debug task does not work #14003

Closed
5 tasks done
sparkoo opened this issue Jul 24, 2019 · 6 comments
Closed
5 tasks done

"Apache Camel" devfile debug task does not work #14003

sparkoo opened this issue Jul 24, 2019 · 6 comments
Assignees
Labels
area/devfile-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@sparkoo
Copy link
Member

sparkoo commented Jul 24, 2019

Describe the bug

Task "run and debug the services" from Apache Camel devfile does not work

Che version

  • nightly

Steps to reproduce

  1. Run workspace from Apache Camel devfile https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/apache-camel-springboot
  2. set breakpoint somewhere where it should be hit
  3. run "run and debug the services"
  4. breakpoint don't get hit

Expected behavior

breakpoint hit out of the box

Runtime

  • minikube (include output of minikube version and kubectl version)

Screenshots

Installation method

  • chectl

Environment

  • my computer
    • Linux

Additional context

@apupier
Copy link
Contributor

apupier commented Jul 24, 2019

it is the only stack which seems to provide a debug task.
we can use some attach launch config (but it requires an extra step which is not trivial):

  • open Debug view
  • Add Configuration
  • provide something like
{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  "version": "0.2.0",
  "configurations": [
    {
      "type": "java",
      "name": "Debug (Attach)",
      "request": "launch",
      "mainClass": "${file}"
    },
    {
      "type": "java",
      "name": "Debug (Attach)-Application<fuse-rest-http-booster>",
      "request": "attach",
      "port": 5005,
      "projectName": "fuse-rest-http-booster"
    }
  ]
}
  • launch the config

but unfortunately, it started to show a few thread sand then failed with:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-07-24 13:41:26.484 ERROR 309 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
***************************
APPLICATION FAILED TO START
***************************
Description:
Embedded servlet container failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.

given that we can use the CodeLens on Application class, I would say that this command should be removed for now. if we are able to auto-connect the debugger, it will become interesting to have it

@apupier apupier self-assigned this Jul 24, 2019
apupier added a commit to apupier/che-devfile-registry that referenced this issue Jul 24, 2019
- cannot make it working even when attaching manually the Java debugger
afterwise
- Debug is available through CodeLens on the Application Java class
- no other devfiles are providing this kind of debug task

Signed-off-by: Aurélien Pupier <[email protected]>
@amisevsk
Copy link
Contributor

The issue is one of naming, I believe. The task should be named something like "run the services with debugging enabled".

The task works, but it only starts the server listening on a JDPA port; you still need to configure the theia debug task, and I don't know if there's a devfile-based way to do that.

An additional issue is that when you start this task, Theia prompts you that "a new service is listening on port 5005". If you choose to expose this port, you won't be able to connect your debugger.

@slemeur
Copy link
Contributor

slemeur commented Jul 24, 2019

@amisevsk : Excellent suggestion to rename the task. I think we should to that as an immediate quick-fix. The user will still have to add the debug configuration for now. until we look at adding the debug config in the devfile indeed.

@slemeur slemeur added this to the 7.0.0 milestone Jul 24, 2019
@slemeur
Copy link
Contributor

slemeur commented Jul 24, 2019

@apupier : Can you help on this issue?

@slemeur slemeur added area/devfile-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. labels Jul 24, 2019
@slemeur
Copy link
Contributor

slemeur commented Jul 24, 2019

I just catched the PR! Thanks @apupier !

apupier added a commit to eclipse-che/che-devfile-registry that referenced this issue Jul 30, 2019
- cannot make it working even when attaching manually the Java debugger
afterwise
- Debug is available through CodeLens on the Application Java class
- no other devfiles are providing this kind of debug task

Signed-off-by: Aurélien Pupier <[email protected]>
@amisevsk
Copy link
Contributor

amisevsk commented Aug 7, 2019

Closing as current apache camel devfile contains a working setup for debugging (start remote application + connect remote debugger).

There are some improvements still possible, as listed in eclipse-che/che-devfile-registry#66 (comment)

@amisevsk amisevsk closed this as completed Aug 7, 2019
nickboldt pushed a commit to nickboldt/che-devfile-registry that referenced this issue Aug 9, 2019
- cannot make it working even when attaching manually the Java debugger
afterwise
- Debug is available through CodeLens on the Application Java class
- no other devfiles are providing this kind of debug task

Signed-off-by: Aurélien Pupier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-registry kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants