What exactly have you installed? Keep in mind that you need either the Firefox or Chrome browser extensions to make this plugin (if that’s the one you mean) work with dynamic sites. You also need to run a local server.
@mdavid This is really outside Kirby support. If the above doesn’t help you, please read the plugin documentation and the documentation for the browser extension carefully.
Hi Sonja, Really appreciate you taking the time to do this demo.
Seems I have other issues - “127.0.0.1 refused to connect.” Which I’ll sort.
Do have one question, you said “you need an additional browser extension to make the plugin work with PHP” is that in addition to Live Server, if so what?
The VS Code Live Server plugin only works with HTML files , that is what I was trying to say from the beginning. You need this browser extensions (available for Firefox and Chrome: https://github.com/ritwickdey/live-server-web-extension)
In the readme you will find the store links for the browser extensions as well as the setup tutorial. As you can see in my GIF, you have to call your original localhost server address in the browser after setting up the matching live server address in the browser extension settings.
In my example, the live server address is http://127.0.0.1:5501, while my Kirby project is by default available at http://325.test (I’m using Laravel Valet, so each project in my public_html folder is automatically available under foldername.test. In your setup, you would stick with http://localhost/plainkit-master.
I’ve had this issues for months and only realized today that it only works with folders (or maybe that’s just me, i don’t know)
So try this:
Create a new folder in VS Code and create/put your files in that or just create a folder in your file explorer on your laptop/PC and open that in VS Code
Right-click on the file you want to open in the browser and choose Open with Live Server, or use the shortcut Alt + L and then Alt + O to open it in a liver sever.
That’s it!
PS - I put fixed in quotation marks because I didn’t really fix anything, I just realized the error popping up on my screen wasn’t actually difficult to follow, I just assumed it was because I was new to programming.
So i came up with all the solutions for what the live server won’t work
After installing reload the VS code or close and open it.
Before starting the live server make sure all your HTML and css or scss files are placed in one complete folder and open that folder in VS code and run live server.
Turn on auto save . Go to->file->auto save . Make sure in has tick mark
Don’t name your folder starting with # //This is important
so all set it should work perfectly.
Keep your browsers updated.