Brackets - Live Preview not working
Asked Answered
C

13

15

I found this awesome program(html editor) called Brackets and it's by Adobe. Now reason why i got the editor was because i wanted to Live Preview PHP code, but i found out later that i needed a Wamp Server.

Now, i was in the mood of making an about page but i couldn't live preview. Live Preview Base URL is empty, and when i try to live preview, i get this: > http://puu.sh/aDkET/4209ec1192.png < and the lightning bolt is half orange(i heard it needs to be red to work). I have tried the lot... Entering as Live Preview Base URL to http(semicolon)//localhost:(insertporthere)/ <-- Wamp Server, tried only localhost, left it empty, I don't know how to make this work.. I am stuck and i basically need real preview..

Please, please help me! D: I have searched the internet looking for solutions, but no. If you can, a step-by-step tutorial would be much appreciated :)

Kind regards, - PiguFilms

Chun answered 3/8, 2014 at 19:43 Comment(3)
This is a forum for programming questions. Use the Adobe forum instead.Glenglencoe
Maybe this link will help you -> open project folderSymposiarch
#34039947 - duplicateHospitaler
F
8

The Live Preview "Base URL" is the localhost URL that corresponds to the root folder of your project. Brackets uses this to map from a local path on disk to the server URL which serves up that same file: it takes the HTML file's path relative to the project root, appends that relative path onto the Base URL, and then launches the resulting full URL in Chrome.

So, for example:

  • If your page is at http://localhost/myapp/page.php and the page.php file is in a "myapp" subfolder of your project, your base URL is just http://localhost/.
  • If your page is at http://localhost/myapp/page.php and the page.php file is in the root of your project, your base URL is http://localhost/myapp/ (this way the path is "/page.php" relative to both bases).

If you think you have the Base URL set correctly but it's still not working, try going to the same URL manually in your browser to make sure your server is operating correctly.

More details on using Live Preview with your own local server can be found here: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#lp-custom-server.

Fibro answered 11/8, 2014 at 8:53 Comment(0)
B
5

although @ytpete's answer is the right choice for your problem but you need to do, as i say, first. In simple words, go to file(in Brackets), click open folder and now make the project directory exactly same as your local host server for php files i.e. C:\Program Files\Ampps\www\phpFiles (i am using Ampps and here 'phpFiles' is a subfolder inside which relies my php file and also html file too). Now you can follow steps shown by ytpete and you are set to live preview of your php file.

Blend answered 5/1, 2015 at 20:4 Comment(0)
A
4

I had this problem as well. What I did was simply goto File->Open Folder... it all worked after all the necessary files were loaded into Brackets.

Abseil answered 14/5, 2018 at 16:2 Comment(1)
I want to use Brackets in MX Linux 21 x386 and found a Fork that are given support in: github.com/quadre-code/quadre and I compile it and working, but the only way to use Live Preview is with this instructions.Concurrence
R
3

If you are using windows try running brackets "As administrator", worked for me

Ribaudo answered 21/12, 2015 at 10:14 Comment(0)
P
1

I had this same issue once I installed Xampp. This video resolved it for me. Essentially just select, File > 'Enable Experimental Live Preview' should have a check mark.

Pringle answered 17/1, 2017 at 22:25 Comment(0)
A
0

Make sure you don't have an internet bandwidth limiter (such as NetLimiter) running while using Brackets' Live preview.

Advent answered 4/2, 2016 at 14:2 Comment(0)
D
0

I have just fixed this issue for myself, I had 'Experimental Live Preview' ticked under file. I unticked it and now it accepts my 'http://localhost/mywebsite' URL when I go to live preview.

Detoxicate answered 20/11, 2016 at 11:54 Comment(0)
B
0

This worked for me. I restarted my system and then unchecked "enable experimental live preview" in file.

Bookerbookie answered 3/2, 2017 at 8:46 Comment(0)
A
0

this worked for me, and i don't remember where i saw it, but go to : cd $HOME/.local/share/applications and delete everything chrome related.

This worked for me, and i didn't dare to use live preview again.

On Ubuntu 16.04 LTS and Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Asberry answered 10/10, 2017 at 17:34 Comment(0)
C
0

Put your files in the same folder where you have index.html file

Commutual answered 3/4, 2020 at 10:3 Comment(0)
N
0

I have selected the option called "reload with extension" from Bracket's debug menu and that resolved live preview issue. More details can be found here.

Neumann answered 24/4, 2020 at 10:47 Comment(0)
P
0

For everyone, this problem can be resolved by following steps:-

  1. On menu bar, go to File --> Open Folder (folder which have your html file for live preview)

  2. Select Folder

  3. Select your html file from left side bar for live preview

  4. Click on bolt icon on right (preview button)

All it melts down to the fact, that you need that folder(which have your file) selected to view your output in live preview. Let me know, if it helps someone. :)

Prioress answered 4/6, 2020 at 14:52 Comment(0)
D
0

It is because it doesn't find the 'html' file. Live preview basically needs html file to run it .In my case, I have a project made in php , my file name is index.php,I renamed it to index.html and it works like charm :)

Dedicated answered 16/2, 2021 at 17:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.