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

Add ephemeral debugging guide #1202

Merged
merged 10 commits into from
Jan 4, 2024

Conversation

kate-osborn
Copy link
Contributor

Proposed changes

Problem: No documentation on how to debug NGF in Kubernetes

Solution: Add a developer guide with step-by-step instructions on how to inject an ephemeral dlv debug container into NGF while it's running in a cluster. Includes makefile targets to make the process easier and a dockerfile for the dlv debug image.

Testing: Ran through the steps in the guide to make sure it works.

Closes #1201

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@kate-osborn kate-osborn requested a review from a team as a code owner October 25, 2023 22:34
@github-actions github-actions bot added chore Pull requests for routine tasks documentation Improvements or additions to documentation labels Oct 25, 2023
Makefile Outdated Show resolved Hide resolved
docs/developer/debugging.md Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
docs/developer/debugging.md Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@kate-osborn
Copy link
Contributor Author

Closing until I figure out why it's not working for everyone

@sjberman
Copy link
Contributor

sjberman commented Dec 20, 2023

Does anyone on the team use VSCode? If so, and you get this working, would love to see what your launch.json configuration file looks like. I can't seem to get VSCode to properly find the file on the remote host that I add a breakpoint to. Almost as if it's looking for the raw file instead of the binary.

@sjberman
Copy link
Contributor

Nevermind, user error.

Copy link
Contributor

@ADubhlaoich ADubhlaoich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Would you like me to migrate this to the website once merged?

@kate-osborn
Copy link
Contributor Author

LGTM!

Would you like me to migrate this to the website once merged?

@ADubhlaoich no thanks! This is a developer doc and doesn't need to be on the public site.

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works well!
I left a few questions.

docs/developer/debugging.md Show resolved Hide resolved
docs/developer/debugging.md Outdated Show resolved Hide resolved
docs/developer/debugging.md Show resolved Hide resolved
docs/developer/debugging.md Show resolved Hide resolved
@kate-osborn kate-osborn merged commit 94ebf5a into nginxinc:main Jan 4, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add debugging guide
5 participants