feat(cli): add --debug-app and --debug-cli flags#1604
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
At the expense of losing the way to write |
Pull request was converted to draft
mrgrain
left a comment
There was a problem hiding this comment.
Almost there, but the whole--debug implies both targets things needs better modelling. we can change the configuration generator package.
|
Reworked the |
There was a problem hiding this comment.
this is always shown, removing the double up
Split the `--debug` flag into `--debug-app` (sets CDK_DEBUG, enables app-level tracing) and `--debug-cli` (enables AWS SDK tracing). The existing `--debug` flag now implies both via a new `yargsImplies` middleware. Config file backwards compatibility is preserved: `debug: true` in cdk.json implies both targets. Also adds configuration reporting to `cdk doctor` and extracts `shouldDisplayVersionMessage()` for cleaner version display logic.
Granular debug flags
The
--debugflag now splits into two independent targets:--debug-app— SetsCDK_DEBUG=truefor the synthesized app. Logs additional information during synthesis (e.g. token creation stack traces). Slows down synthesis.--debug-cli— Enables verbose AWS SDK tracing in the CLI itself.--debugcontinues to work as before and implies both--debug-appand--debug-cli.Configuration
The flags are also available in
cdk.json/~/.cdk.json:{ "debugApp": true, "debugCli": true }An existing
"debug": truein config files implies both targets for backwards compatibility.cdk doctorimprovementscdk doctornow reports some CLI configuration (verbosity level, active debug targets).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license