0

I'm using DDEV with Visual Studio Code and I tried to configure Live Server Extension to automatically auto reload page that I'm working on in Chrome when I hit save in VSC, but it doesn't seem to work with PHP.

Is there a way to configure this to work with DDEV?

I can't seam to find any info on this issue.

Thanks

Mountain Spring
  • 87
  • 1
  • 1
  • 7

1 Answers1

0

I've managed to do it another way, with guard and guard-liveguard on linux.

The workflow was:

guard installation

guard-livereload installation

Installation was not quite straightforward, but you can follow the instructions in Terminal and install what's missing if it tells you so.

Guard placed Guardfile inside of /home/user directory so I edited it to contain only this, regarding livereload pard:

guard 'livereload' do
watch(%r{.+\.(css|scss|html|php|js)$})
end

Then I installed Liveguard Google Chrome Browser Extension from here: http://livereload.com/extensions/

Under settings I had to enable "Allow access to file URLs".

Also, you have to press liveguard extension icon in Chrome in order for it to track changes.

That's about it, now when I edit any of the file types entered in Guardfile (you can edit and add what you need, of course) it automatically reloads my Chrome window whit the edited page opened.

Mountain Spring
  • 87
  • 1
  • 1
  • 7