Skip to content

Debug session failed to start #2608

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

Closed
odockal opened this issue Oct 31, 2022 · 10 comments · Fixed by #2634 or #2716
Closed

Debug session failed to start #2608

odockal opened this issue Oct 31, 2022 · 10 comments · Fixed by #2634 or #2716
Assignees
Milestone

Comments

@odockal
Copy link
Contributor

odockal commented Oct 31, 2022

Linux, fedora 36, Using remote OCP

  1. Connect to the openshift cluster (OCP)
  2. Create new project
  3. Create an app from devfile registry (quarkus)
  4. Start in Dev mode
  5. Verify app is running (open in browser, go to /hello end point)
  6. Change source code
  7. Verify changes were propagated
  8. Put a breakpoint in the code
  9. Start debug
  10. Choose an url provided
  11. Install extensions if needed (java ext. pack)
  12. Verify debug is working
    Actual result: Error: Debug session failed to start
@mohitsuman mohitsuman added this to the 1.0.0 milestone Oct 31, 2022
@dgolovin dgolovin self-assigned this Oct 31, 2022
@dgolovin
Copy link
Collaborator

dgolovin commented Nov 1, 2022

@odockal this seems related to devfile content. Will check with odo team if we need to run 'odo dev --debug' to make it work.

@dgolovin
Copy link
Collaborator

dgolovin commented Nov 2, 2022

This is most likely devfile issue devfile/registry#122. On our side we might want to run odo dev --debug in case of Debug: ture when describing component.

@odockal
Copy link
Contributor Author

odockal commented Nov 4, 2022

@dgolovin I have tested again today and got also a bit different error:
Cannot read properties of undefined (reading 'fp')

@dgolovin
Copy link
Collaborator

dgolovin commented Nov 5, 2022

@odockal Cannot replicate. Tried all the possible usecases: before ports forwarded, after they forwarded.

When does that happen, before you select local target port or after?

@dgolovin
Copy link
Collaborator

dgolovin commented Nov 5, 2022

@odockal found it! It happens if you cancel port selection.

dgolovin added a commit to dgolovin/vscode-openshift-tools that referenced this issue Nov 5, 2022
dgolovin added a commit that referenced this issue Nov 5, 2022
@dgolovin dgolovin reopened this Nov 5, 2022
@dgolovin
Copy link
Collaborator

dgolovin commented Nov 5, 2022

I have also added --debug option when running odo dev for components supporting debuging.

@dgolovin
Copy link
Collaborator

dgolovin commented Nov 5, 2022

Debug is not going work out of the box until pr above is applied to the registry, due to missing debug endpoints in devfiles.

@odockal
Copy link
Contributor Author

odockal commented Nov 7, 2022

@dgolovin I have only one option as an URL to choose from: 127.0.0.1:40001. If I choose that, nothing really changes. There is no cancel operation from my side.

@mohitsuman mohitsuman modified the milestones: 1.0.0, 1.1.0 Nov 7, 2022
@rm3l
Copy link
Member

rm3l commented Nov 8, 2022

FYI, devfile/registry#122 has been merged and applied to both staging and production registries. So debug endpoints can now be forwarded out of the box by odo.
See redhat-developer/odo#5988 (comment)

@mohitsuman mohitsuman modified the milestones: 1.1.0, 1.2.0 Dec 14, 2022
@dgolovin
Copy link
Collaborator

Verified on python-django and there is 'debug' port now declared in port-forwarding section. I'll modify starting debugger and look for 'debug' port first, if not available extension is going to ask to select port form the available ones. I'll also show port names if quick pick if available.

dgolovin added a commit to dgolovin/vscode-openshift-tools that referenced this issue Dec 21, 2022
dgolovin added a commit that referenced this issue Dec 21, 2022
This PR fixes #2608.

Signed-off-by: Denis Golovin [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment