-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat: enable DWARF debug info in the build by setting XCADDY_DEBUG=1 #62
Conversation
How to Debug a Caddy Module under Development in VSCodecd <your local repo>
# Build a caddy with your module and turns on debug info
XCADDY_DEBUG=1 xcaddy build --with github.com/ggicci/caddy-jwt=$( pwd ) --output ./caddy In VSCode, create a {
"version": "0.2.0",
"configurations": [
{
"name": "Launch Caddy",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/caddy", // the debug output of caddy
"args": ["run", "-config=example/Caddyfile"], // args to caddy
"cwd": "${workspaceFolder}"
}
]
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the entire readme need to be reformatted? Let's please just make the necessary changes.
How would this be used when running xcaddy in dev mode (i.e. not the build
subcommand)? Why not use XCADDY_DEBUG
env var instead that can work in both cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, thanks for the revisions!
Fixes: #61
Allow building a debug output by setting
XCADDY_DEBUG=1
forxcaddy
command.Examples:
XCADDY_DEBUG=1 xcaddy build --with github.com/xxx/xxx=$(pwd) XCADDY_DEBUG=1 xcaddy run