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

14 Replies, 1667 Views

Turning playwright headless off is def the way to go for debugging. Just do:

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

But heads up—it *will* be slower. Not unbearable, but noticeable.

If you wanna avoid it, try `playwright inspector` (`PWDEBUG=1` env var). It’s like having a debugger built-in without messing with headless mode.

Also, `page.pause()` is a lifesaver for stepping through tests.

Messages In This Thread



Users browsing this thread: 1 Guest(s)