Test & Preview a Chrome Extension

Hello,

I’m trying to edit a Chrome Extension within IDX and want to be able to preview changes as I make them. In the past I’ve loaded an unpacked extension folder saved locally on my computer and made edits in VS Code while having Chrome open to run the extension and preview changes. Is there any way this is possible within IDX?

Thank you!

The only way I can think of is to zip the files in idx then download it and load it in chrome browser… So similar to how you would do it in vs code locally

Agreed - so I’m currently working on a sort of update loop through git where I can edit in IDX → commit to github → pull the changes from github into VS Code → VS Code will update the files saved locally on my computer that Chrome is using the run the unpacked extension. It’s clunky but it should work.

I was hoping that the built in web preview in IDX could get it to run, but so far that’s been a brick wall for me.

Yeah not sure maybe someone from the IDX team can weigh in it you can maybe directly download from idx itself to save some time…

I think the web preview is extremely similar to the web preview option in vs code so since it not possible in that might be the same here

1 Like

Update: The extension “Live Server” Name: Live Server Open VSX Registry works to open a preview of the extension in a browser window. Since my extension is basic html and ajax, it works mostly fine. Some styles don’t display correctly, but it fits my needs for now.

1 Like

You should be able to build the chrome extension an download the file to load as an unpacked extension into chrome.

For previewing the extension you could use the web preview but the chrome APIs would not work. There might be an emulator option though