How to Enable Step Debug Logging in GitHub Actions
Setting the ACTIONS_STEP_DEBUG secret to true makes every step emit verbose debug lines you can re-run a job to capture.
Add a repository or organization secret (or variable) named ACTIONS_STEP_DEBUG set to true, then re-run the job. For runner internals, set ACTIONS_RUNNER_DEBUG too.
Steps
- Open Settings to Secrets and variables to Actions.
- Add
ACTIONS_STEP_DEBUGwith the valuetrue. - Re-run the failed job to capture the verbose log.
Emit your own debug lines
.github/workflows/ci.yml
steps:
- run: |
echo "::debug::Resolved version is $VERSION"
npm run buildGotchas
::debug::lines only appear when step debug logging is enabled.- Debug logs can leak internal values; remove the secret when finished.
Related guides
How to Group Log Output Into Collapsible Sections in GitHub ActionsFold noisy command output into collapsible groups in GitHub Actions logs using the ::group:: and ::endgroup::…
How to Safely Use a Context Value in a run Step in GitHub ActionsAvoid script injection in GitHub Actions by passing untrusted context values like PR titles into a run step t…