Open ghost opened 3 years ago
You can see everything being sent by looking in the database for each session in the DevtoolsMessages table.
Session databases can be found here: https://secretagent.dev/docs/advanced/session
Yeah, that would do. But being able to simply output that to the console would be handier imho.
We used to output to console like Playwright/Pupp, but turned it off because it was just too much noise for normal debugging. There are a few other reasons I turned it off from default output logs:
In any case, please let me know more about what you're trying to troubleshoot and why the db is less convenient. Will help me understand how to make this more useful to you.
Your points are valid. I just get used to pup's debugging when you redirect all output to text file and then open it in text editor and search events by target id or whatever. With sqlite i can do the same but with few extra steps, which is not a big deal.
I found that if I turned on logging, it slowed down the process so much that sometimes it would stop triggering the events I wanted to investigate
That's pretty disturbing. I wasn't aware of that.
To clarify, i meant being able to output to console alongside outputting to db. But yeah, that's probably would be handy only for me and few others.
That's pretty disturbing. I wasn't aware of that.
It was mostly just timing bugs that I couldn't reproduce, to be fair.
Your use case seems pretty normal when I think about it. I may have just gotten used to using the db at this point. Would you want to mix it in with all the other logs? Or are you just thinking it would be useful to route devtools specific logs off somewhere?
Would you want to mix it in with all the other logs?
Don't think it'll be a good idea. Unless it'd be possible to filter logs from different layers like it's done in pup.
Or are you just thinking it would be useful to route devtools specific logs off somewhere?
For me, yes )) But for others it can be useless. So, it's up to you.
How do i see all devtools commands that are being sent and received? Puppeteer supports
DEBUG
env variable which turns verbose logging but insecret-agent
setting that logs to console only a small portion of what's being sent back and forth.