GitHub Actions: Debug Logging
Debug logging is an extra detailed log for a workflow run. It shows the hidden steps GitHub takes, like setting up the runner and fetching the code.
Switch it on with a secret
A secret is a hidden value stored in the repo settings. This one tells GitHub to log extra detail.
Settings > Secrets and variables > Actions
New secret: ACTIONS_STEP_DEBUG = trueSwitch it on for one run
Open the run page. The Re-run jobs menu offers Re-run with debug logging.
Run page > Re-run jobs > Re-run with debug loggingPrint a debug line
A line starting with ::debug:: appears only when debug logging is on.
- run: echo "::debug::Checking the test files"Example
name: Debug Logging Demo
on: push
jobs:
debug-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: echo "::debug::Code is checked out"
- uses: actions/setup-node@v7
with:
node-version: '24'
- run: npm testKey points
- Debug logging: extra detail in a run log, switched on for one run.
- Set the ACTIONS_STEP_DEBUG secret to true to switch debug logging on.
- Use the Re-run jobs menu and pick Re-run with debug logging to switch it on for one run.
- Use the ::debug:: marker in a run step to print a debug line of your own.
- Turn debug logging off again after the problem is fixed.
- Debug logging is the detailed log that shows what GitHub did behind the scenes.
In this example, the workflow runs on every push. It checks out the code. It prints a debug line. It sets up Node 24. It runs npm test. With debug logging on, the log also shows the setup detail GitHub normally hides. The tests pass.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
How is debug logging switched on for a repo?