How do I turn playwright headless off for debugging? or Why would you want to turn playwright headles

14 Replies, 1655 Views

Hey! Turning playwright headless off is def the move for debugging. Just do:

```javascript
const browser = await playwright.firefox.launch({ headless: false });
```

But if you wanna keep it headless *and* debug, try `playwright trace viewer`. Run your test with `--trace on`, then open the trace file later. It’s like a time machine for your test runs!

Also, `console.log()` is your friend—sometimes old-school works best.

---

Messages In This Thread



Users browsing this thread: 1 Guest(s)