From memory, passing data between content, background and popup scopes was a real pain in the ass when dealing with Chrome extensions.
I believe that's one of the limitations of puppeteer-web in general is that it opens up a new web page as it only has access to the connect api as opposed to launch which can open up a brand new tab in your original instance. It looks like the link I posted initially to the official docs is 404'd :/ but I found my initial info here.
When I was debugging popup.js, I just clicked my chrome extension next to the url bar to open up the popup.html viewport, right click -> inspect and added a breakpoint to my popup.js file. That way when the new browser instance launched via puppeteer, the popup window doesn't close. Let me know if you've already tried that, sorry I couldn't be more help.
Okay, so it seems like everything is working as I expected. I am using Chrome Canary for my testing and it seems to be working but the debugger tools are not behaving perfectly. I can debug though.
Thanks for following up.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
From memory, passing data between
content
,background
andpopup
scopes was a real pain in the ass when dealing with Chrome extensions.I believe that's one of the limitations of puppeteer-web in general is that it opens up a new web page as it only has access to the
connect
api as opposed tolaunch
which can open up a brand new tab in your original instance. It looks like the link I posted initially to the official docs is 404'd :/ but I found my initial info here.When I was debugging
popup.js
, I just clicked my chrome extension next to the url bar to open up thepopup.html
viewport, right click -> inspect and added a breakpoint to mypopup.js
file. That way when the new browser instance launched via puppeteer, the popup window doesn't close. Let me know if you've already tried that, sorry I couldn't be more help.Okay, so it seems like everything is working as I expected. I am using Chrome Canary for my testing and it seems to be working but the debugger tools are not behaving perfectly. I can debug though.
Thanks for following up.