Live Preview using VS Code?

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
krishunt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 139
Joined: Wed Feb 08, 2012 8:37 pm

Live Preview using VS Code?

Post by krishunt » Fri Jan 20, 2023 1:13 am

I'm working on a Joomla site on a local server. I just started using VS Code, and I've installed the Live Preview extension. But it seems VS Code is only able to preview individual files in the Joomla installation folder, and not the site itself. Is there any way around this? I'd like to be able to see a live preview of my Joomla site in the VS Code preview window.

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1618
Joined: Tue Jun 30, 2020 12:17 pm

Re: Live Preview using VS Code?

Post by Pavel-ww » Fri Jan 20, 2023 7:26 am

krishunt wrote:
Fri Jan 20, 2023 1:13 am
I'm working on a Joomla site on a local server. I just started using VS Code, and I've installed the Live Preview extension. But it seems VS Code is only able to preview individual files in the Joomla installation folder, and not the site itself. Is there any way around this? I'd like to be able to see a live preview of my Joomla site in the VS Code preview window.
Hi. Live Preview is designed only to view statics (HTML files). PHP generates HTML on the fly through an appeal to the database. That is, before applying to the database, most of the HTML code does not exist. Therefore, this is not possible.

IMO - Even when viewing HTML files via Live Preview inside VS Code, this is very not convenient and not usable. Use VS Code only as a file editor, and entrust the browser viewing via Live Server extension for html files (in this case local server not need) and by pressing in browser CTRL + F5 for any CMS.
I find Live Preview useless extension.

krishunt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 139
Joined: Wed Feb 08, 2012 8:37 pm

Re: Live Preview using VS Code?

Post by krishunt » Fri Jan 27, 2023 11:09 pm

It is extremely handy for writing CSS styles and seeing your changes take effect immediately without having to switch applications and hit reload.

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1618
Joined: Tue Jun 30, 2020 12:17 pm

Re: Live Preview using VS Code?

Post by Pavel-ww » Sat Jan 28, 2023 7:50 am

krishunt wrote:
Fri Jan 27, 2023 11:09 pm
It is extremely handy for writing CSS styles and seeing your changes take effect immediately without having to switch applications and hit reload.
Hi. I agree with you - it would be convenient. But unfortunately, this is not possible with CMSs.
Use Dev Tools for this purpose. This is even much more convenient. After the result satisfies you, copy and paste into vs code

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44071
Joined: Sat Apr 05, 2008 9:58 pm

Re: Live Preview using VS Code?

Post by Webdongle » Sun Jan 29, 2023 7:54 pm

My preference is Notepad++. I use an ftp program and open the css file for edit then save and upload. Then refresh the browser. If I don't like the changes I can undo the changes in Notepad++ before trying again. If working on localhost no need to upload the file just save the edit and refresh the browser. Simple and quick especially when using Alt+Tab to switch screen,

Horses for courses and Live preview from a css editor is the wrong horse for viewing dynamic html pages
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Locked

Return to “General Questions/New to Joomla! 4.x”