Playwright trace viewer completely changed how I debug failing CI tests
Ajitesh MohantaAmbassador
May 16, 2026 2,194 0
Before trace viewer, debugging a CI failure meant adding `console.log`, pushing, waiting 8 minutes for CI, repeat. Miserable.
Now our CI uploads traces on failure and I can:
- Scrub through every action with exact timestamps
- See the DOM snapshot at each step
- Inspect network requests that fired during the test
- Check console errors that didn't surface in the test output
Setup is two lines in `playwright.config.ts`:
```typescript
use: {
trace: 'on-first-retry',
}
```
And in CI (GitHub Actions) we upload the artifact:
```yaml
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-traces
path: test-results/
```
The thing that surprised me most: you can open traces directly at `trace.playwright.dev` without installing anything. If you're not using this, start today.