Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug puppeteer in headless mode

Does anyone knows how can i debug puppeteer while it runs headless? I have this E2E Jasmine test which runs fine under non headless mode , but as soon as i run headless , it fails. i'm trying to understand why it fails under headless mode (i'm suspecting it is related to a react render stuff) , but in order to get some common sense , i must use a debugger. P.S the documentation implies i should run non headless in order to see whats going on , but thats not helping in my case :/ Thanks in advance!

like image 365
Yoav Lahav Avatar asked Oct 19 '25 22:10

Yoav Lahav


1 Answers

You can debug it easily with DEBUG.

Example command to run,

DEBUG=* node app.js
like image 93
Md. Abu Taher Avatar answered Oct 25 '25 00:10

Md. Abu Taher