feat: enable DWARF debug info in the build by setting XCADDY_DEBUG=1

This issue has been created since 2021-07-02.

Fixes: #61

Allow building a debug output by setting XCADDY_DEBUG=1 for xcaddy command.

Examples:

XCADDY_DEBUG=1 xcaddy build --with github.com/xxx/xxx=$(pwd)
XCADDY_DEBUG=1 xcaddy run
ggicci wrote this answer on 2021-07-02

How to Debug a Caddy Module under Development in VSCode

cd <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 launch.json:

{
  "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}"
    }
  ]
}
More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-09-22
Star Count 381
Watcher Count 14
Fork Count 72
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
No breakpoints set, but image changes on viewport change 1 2021-10-11 2022-08-10
Provide compatibility with Gatsby v4 5 2021-11-20 2022-04-20
[gbimage-bridge] Is it possible to use art-direction without querying `fluid`? 1 2022-01-13 2022-07-22
Sepia <> openHAB 3 --> Can not set "Type" and "Room" for SmartHome devices 1 2022-03-31 2022-09-12
Error while submitting image. 6 2015-08-26 2022-08-30
StarfishQL backed by multiple database backends 3 2022-04-21 2022-08-28
Columns view: manage colors of columns and sizes 0 2022-04-25 2022-05-11
Re-implement recent searches/files/etc. match-algorithm 0 2022-04-25 2022-05-11
Codegen: AWS Lambda sources don't compile 3 2022-06-10 2022-09-25
Remove <prefix> from preset.preset_lore_cost 0 2022-02-08 2022-02-14
Filtering checks based on broken dependencies 1 2021-06-05 2022-09-18
[Feature][api] add some interface comment 0 2022-01-31 2022-08-19
> I simply did fwupdmgr update X 2 2022-02-22 2022-09-04
support for RS485 CAN hat 5 2021-04-14 2021-12-20
Reevaluate where time is getting stored 3 2022-06-03 2022-09-25
连接上socket后,无法收到消息,也没有响应 3 2021-06-17 2022-09-14
enhancement for cmake configuration -- systemdir variable 2 2022-03-04 2022-09-02
Animate tabs opening and close? 1 2021-01-04 2022-09-20
Different offset for enter and exit 5 2019-04-02 2022-07-27
CS resolution too weak with function fields 0 2022-05-17 2022-09-05
Request: Option to disable when pasting into code blocks 0 2022-03-26 2022-09-19
Fresh install, local isn't loading/respecting local config browsersync values 3 2020-02-21 2022-09-01
Local Import not working properly on 2.4.1 ocsserver 1 2018-06-20 2022-09-18
Library has inadequate documentation in the docs directory 0 2020-09-14 2022-09-23
Add prop to allow users to define their own options 1 2022-02-20 2022-09-03
小鹤双拼中第一个输入u与 k无法立即显示候选词汇 0 2021-02-26 2022-08-29
Automatically turn on test_mode 1 2021-01-05 2022-08-06
chess|move|a3f8|21697 1 2022-04-25 2022-08-10
Make dropdown name unselectable in end-user portal 1 2022-09-06 2022-09-28
Different path to PHP not respected in crontab > scheduled tasks. 5 2022-09-05 2022-09-28
Question: CLI and Web Console login problem on k8s 2 2020-08-20 2022-09-22
novojornal.co.ao 0 2021-03-20 2021-10-30
Implement shiftRight function pushdown 0 2022-06-30 2022-07-04
add use case for service worker resource installation 3 2019-02-26 2022-09-17
検査陽性者データに接種歴の有無と死亡日の反映を、他 5 2021-08-22 2022-09-27
[backport v2.7-branch] backport of #43576 failed 1 2022-04-12 2022-09-09
java.lang.IllegalStateException: unable to extract reference name element from SolFunctionCallExpressionImpl(FUNCTION_CALL_EXPRESSION) 2 2022-01-31 2022-09-18
For the .on, do we need to specify that it's async? 2 2020-05-28 2022-09-15
[100 SigmaUSD] Check that node wallet is unlocked on app start 2 2022-07-06 2022-09-01
Does RStudio "preloads" packages? Crashing issue with rgl 5 2022-06-02 2022-09-26
CustomFlutterBinding();执行这个就报错 版本'v3.0-null-safety-preview.10' 1 2021-09-10 2022-09-26
Bad code block style after upgrade to 3.8.0 2 2022-02-10 2022-07-31
hevm: thread blocked indefinitely in an MVar operation 0 2021-11-12 2022-09-26
Unknown function: systemlist 2 2016-03-07 2022-09-25
Key presses regularly get spammed or not recognised 1 2022-08-03 2022-09-16
el.querySelectorAll is not a function when el is a Vue component Proxy 4 2021-11-11 2022-09-09
[BUG] Updating node doesn't update npm's target dir for binaries 4 2021-08-20 2022-08-30
Remove support for non-SSA code 0 2021-09-01 2022-08-14
[Bug]: Link to help page for WordPress.com Plans not working 2 2022-04-29 2022-09-27
[Bug]: Tuning requests unreasonable amount of memory 5 2022-02-24 2022-09-23