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 debug makefile targets #890

Merged
merged 2 commits into from
Jul 25, 2023
Merged

Conversation

kate-osborn
Copy link
Contributor

@kate-osborn kate-osborn commented Jul 20, 2023

Proposed changes

In order to debug NKG while it is running in Kubernetes, you need to build the NKG container with a binary that includes the debug info and symbols and disables optimizations that make debugging hard.

Problem: There are no makefile targets for building a debug binary.

Solution: Add makefile targets for building a debug binary and a container with the debug binary.

Testing: Verified that the debug info and symbols are present and debugging with dlv works.

Note: a debug guide that describes how to remotely debug NKG is coming soon. This guide will leverage these debug makefile targets.

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 July 20, 2023 00:51
Makefile Outdated Show resolved Hide resolved
@kate-osborn kate-osborn merged commit beb3bed into nginxinc:main Jul 25, 2023
20 checks passed
@lucacome lucacome added the chore Pull requests for routine tasks label Aug 15, 2023
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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants