adampresley / sublime-view-in-browser

Open the contents of your current view/tab in a web browser
MIT License
272 stars 69 forks source link

Configure with local server not working #55

Open sivaprabug opened 8 years ago

sivaprabug commented 8 years ago

This is my project config

{ "folders": [ { "path": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners" } ], "settings": { "sublime-view-in-browser": { "baseUrl": "http://localhost", "basePath": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners/001/index.html" } } }

My View In Browser.sublime-settings

`{ "posix": { "linux": { "firefox": "firefox -new-tab", "chrome": "google-chrome", "chrome64": "google-chrome", "chromium": "chromium" }, "linux2": { "firefox": "firefox -new-tab", "chrome": "google-chrome", "chrome64": "google-chrome", "chromium": "chromium" }, "darwin": { "firefox": "open -a \"/Applications/Firefox.app\"", "safari": "open -a \"/Applications/Safari.app\"", "chrome": "open -a \"/Applications/Google Chrome.app\"", "chrome64": "open -a \"/Applications/Google Chrome.app\"", "yandex": "open -a \"/Applications/Yandex.app\"" } }, "nt": { "win32": { "firefox": "C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab", "iexplore": "C:\Program Files\Internet Explorer\iexplore.exe", "chrome": "%Local AppData%\Google\Chrome\Application\chrome.exe", "chrome64": "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "yandex": "%Local AppData%\Yandex\YandexBrowser\browser.exe" } },

"browser": "chrome64",

} `

adampresley commented 8 years ago

Try taking the index.html and path off off. The basePath needs to be the base location of your files.

{
   "folders": [ 
      { "path": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners" } 
   ], 
   "settings": { 
      "sublime-view-in-browser": { 
         "baseUrl": "http://localhost", 
         "basePath": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners/001/index.html" 
      } 
   } 
}```
sivaprabug commented 8 years ago

Hi @adampresley ,

Directly open file path only not with localhost [Server Configuration

directlyopenfilepath ]

sivaprabug commented 8 years ago

Hi @adampresley

i need like below

http://localhost/sivaprabug/Github/Backbonejs-for-Beginners/010_loading_data/

adampresley commented 8 years ago

Try

{
   "folders": [ 
      { "path": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners" } 
   ], 
   "settings": { 
      "sublime-view-in-browser": { 
         "baseUrl": "http://localhost", 
         "basePath": "E:/xampp/htdocs/sivaprabug/Github/Backbonej-for-Beginners/001" 
      } 
   } 
}

This should open up the file index.php at http://localhost/index.php.

sivaprabug commented 8 years ago

Hi @adampresley

Same window only opened..

file:///E:/xampp/htdocs/sivaprabug/Github/Backbonejs-for-Beginners/001/index.html

adampresley commented 8 years ago

Can you paste your exact configuration here please? Also some details regarding your local PHP setup might help as well. Thanks

ghost commented 8 years ago

Same problem here. Same setup as above (but using firefox). Are you testing on a PC?

sivaprabug commented 8 years ago

I have added the configuration file screen shots.. view in browser sublime-settings backbonejs-lynda sublime-project

tito433 commented 6 years ago

same problem here in my home pc. But its working fine in my office pc. Maybe its related to sublime version.