mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 15:45:48 +03:00
[PR #384] [MERGED] feat: add debug mode with --debug flag and ASC_DEBUG env var #488
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#488
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/384
Author: @nerdynikhil
Created: 1/31/2026
Status: ✅ Merged
Merged: 1/31/2026
Merged by: @rudrankriyam
Base:
main← Head:feat/debug-verbose-mode📝 Commits (4)
f4242cffeat: add debug mode with --debug flag and ASC_DEBUG env vare523b8ftest: fix debug cmdtest compile errors95e53a8fix: harden debug logging and split http flag5a7a4b5test: expand debug coverage📊 Changes
9 files changed (+594 additions, -12 deletions)
View changed files
📝
Agents.md(+1 -0)📝
README.md(+7 -0)📝
internal/asc/client_core.go(+105 -0)➕
internal/asc/client_core_debug_test.go(+150 -0)📝
internal/asc/client_http.go(+115 -12)➕
internal/asc/client_http_debug_test.go(+123 -0)➕
internal/cli/cmdtest/debug_test.go(+76 -0)📝
internal/cli/shared/shared.go(+16 -0)📝
internal/config/config.go(+1 -0)📄 Description
The Problem I Hit
Yesterday I was trying to figure out why my CI pipeline kept failing with authentication errors. The CLI just said
"authentication failed" and... that's it. No URL, no status code details, nothing.
I had no idea if:
I ended up adding
fmt.Printlnstatements all over the HTTP client code, rebuilding, and re-running. Super tedious.This is a common pain point - I've seen similar issues in the repo multiple times where users are like "it doesn't
work" and we have no way to see what's actually happening.
What This Adds
A simple
--debugflag that shows you what's going on:→ HTTP Request method=GET url=https://api.appstoreconnect.apple.com/v1/apps authorization="Bearer [REDACTED]"
← HTTP Response status=401 elapsed=234ms
Boom. Instantly I can see the request is actually going out, what URL it's hitting, and the exact status code.
Would've saved me hours.
Also logs retries which is super helpful when you're getting rate limited:
⟳ Retrying request attempt=1 max_retries=3 delay=1.2s error="rate limited by App Store Connect"
Why You'll Want This
For local dev: Just run
asc --debug apps listwhen something breaks. No more guessing.For CI/CD: Set
ASC_DEBUG=1in your workflow and you get full request logs in your CI output. Debugging flakybuilds becomes way easier.
For support: When users report issues, ask them to run with
--debugand paste the output. Instant visibilityinto what's actually failing.
Safety
Authorization headers are sanitized (
Bearer [REDACTED]) so you can safely paste debug logs in issues withoutleaking credentials.
Try It
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.