Brackets – Live Preview not working

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.

Leave a Comment