-
Notifications
You must be signed in to change notification settings - Fork 243
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 #5690
odo dev --debug #5690
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
dfc7e66
to
db39bec
Compare
da09c92
to
d08dfba
Compare
d08dfba
to
e755f6b
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@feloy in the past when we were working on debug mode, we used to consider testing things using VS Code For this PR, I downloaded the devfile in the tests of this PR, but can't really connect to it. Or, maybe, VS Code is connecting to it, but I don't know what to do. Also, I have never worked with websockets myself, so maybe I'm doing it completely wrong. Do you think you can share the steps you followed to test the debug mode yourself? I spent some time on it, but still feel dumb about this thing (how to test debug mode functionality.) |
@dharmit It should be the exact same way as with odo v2. If you follow the steps described in this blog post (Debugging the micro-service), it should work: https://dev.to/feloy/odo-a-tool-to-simplify-development-on-kubernetes-5c9a To test with the files used in the integration test, you can get the launch.json from the blog post, then run a Debug session and set a Breakpoint where a request is replied (on the |
FWIW, I tested this PR earlier today using this sample Spring-Boot Maven project (forked from the SpringBoot Getting Started Guides to add a
|
@feloy I am doing something wrong, it seems.
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "odo dev debug",
"program": "${workspaceFolder}/server.js",
"address": "localhost",
"port": 40002,
"localRoot": "${workspaceFolder}",
}
]
} I have added breakpoints at both the lines in the The feeling of dumbness is getting real bad at this point, so I'll approve since I don't want my limitation to block your PR. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharmit The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can you try with this launch.json:
|
/override ci/prow/v4.10-integration-e2e IBM Could tests pass |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.10-integration-e2e In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
That works. Thanks! It works when I curl the port 40001, not 40002. However, the debug port 5858 is forwarded to 40002:
I think I need to use websockets instead of http when trying to work with 40002, right? |
Port 5858 (and 40002) are for the debugger only, for it to be able to communicate with the process inside the container. You, as a developer, don't need to use it directly. |
OK, thanks for guiding me patiently. I surely need some debugging 101 class/course. 😞 |
* odo dev --debug * Integration tests * validate commands * Fix rebase * Review: Add integration test * Modify error message when run/debug commands are not found in devfile
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #5583
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: