just got PHPStorm and i am wondering if it is possible to run index.php in chrome using live edit? I managed to get it working with index.html, but php debug just opens the console.
Any tutorials?
The reason why you can't live edit PHP is because it is a server-side script, not a client side script like JavaScript. Thus, you will not see live updates in Chrome; you will need to refresh to get updates.
PHPStorm does support debugging PHP, though, just in a different way:
JetBrains PHP Debug Documentation
Related
I'm using Sublime Text 3.
When I go to Tools -> Xdebug -> Start Debugging (Launch Browser), Internet Explorer launches, although I have set Google Chrome to be my default browser in Windows 10 Settings.
I tried looking into Sublime Text settings files but I did not find anything concerning default browsers.
Is there a way to fix it?
XDebug Client (which I assume you're using) uses Python's webbrowser module to launch your browser. Apparently, something is wrong with your Windows setup, or the way the default browser is defined has changed, as webbrowser's default functionality isn't working. You can try it by opening Sublime's console (View -> Show Console or Ctrl`) and entering the following code:
import webbrowser; webbrowser.open("https://www.google.com")
I would imagine based on your problem that IE will open.
The only way I know of to get around this, short of modifying the code for XDebug, is to set the BROWSER environment variable to the complete path to the Chrome executable. Once you do that, completely restart Sublime, reconnect to your PHP server, and see if Chrome now works. You can also try the above code again.
Good luck!
I just ran into a problem, While I was updating the js and css files for my website on a server, I do not see the immediate change. However, if I were to edit these files on a local computer or go on incognito mode on chrome, I see the change right away.
let's say I have:
div{width:100px}
after I change it to div{width:200px}, when I pop open the developer tool, it still reads div{width:100px}.
I feel like I need to clear something for the broswer, any explanation for this?
Check the caching headers you are using for static resources. The browser is likely using a cached version.
I use WebStorm and it comes with awesome LiveEdit function, and it's totally much better than LiveReload, however it doesn't automatically register changes in all different types of files I'm using. It ignores changes in Stylus and Jade and I need to manually trigger reloading the page anyway.
I guess because LiveEdit doesn't reload entire page, but only relevant parts, and Webstorm of course can't possibly know what needs to be redrawn on the page, when dealing with Jade or Ejs templates
For that matter LiveReload feels to be a better solution.
But I was wondering if it's possible to trigger reloading the page by sending signals to "JetBrains IDE support extension" somehow?
So ideally grunt-task, or gulp-task (I'm using gulp) would watch files for changes and send signals (maybe to WebStorms built-in server) and extension would reload the page. Is that possible?
Can you control Jetbrains built-in server with node?
No. The extension doesn't have the API
However, LiveEdit does normally work for Jade (no hotswap, of course - just page reloading). When Jade is compiled using a file watcher, live reload is correctly triggered. It also works when Jade is compiled with Express. What does your workflow look like? How do you compile Jade, Stylus and other files that aren't natively executed by the browser?
I have tried using the Tincr Chrome Extension now on Windows and Linux (Ubuntu) and it still does not seem to do the Live Reloading it claims to on its website when I am editing the file in an external editor. The Tin.cr website claims:
Any CSS or JavaScript changes you make in any editor reloads in Chrome
without refreshing the whole page
To explain further, I have tried installing this extension as an unpacked extension in Chrome with Developer Mode checked under chrome://chrome/extensions/ as suggested in the Tincr documentation. I have also tried installing this extension directly through the Chrome Web Store. The effect has been the same.
In terms of setting up Tincr, I have tried opening up my file locally without a web server using file://C:/htdocs/file.html which Tincr claims in its documentation it can read automatically without needing any setup, and also I have tried opening up my file via an Apache Web Server on localhost e.g. localhost/file.html and setting up the Project Type in Tincr as Http Web Server as suggested in the documentation, but both ways have been to no avail.
In terms of editing my local file, I have used a number of different external editors, for example, Geany on Ubuntu and Titanium Studio on Windows.
After editing the file in the editor I have left the page I am editing open in my Chrome browser with the Tincr plugin setup and enabled. However, after saving my file in the editor and looking to see if it live reloads in Chrome, nothing happens. The file simply stays the same. Again, to reiterate, this is happening in both Windows and Linux (Ubuntu).
And so my question is this: has anyone successful tried using this extension with an external editor and if so could you please detail the steps to get live reload to work as I'm beginning to think this may be a bug in the extension?
I think I may have an explaination. Having a look at the google groups for Tincr, it appears Tincr does not support html file refresh, and that it can only detect changes in either css or javascript.
source: https://groups.google.com/forum/#!topic/tincr-for-chrome-devtools/VyC0mavLs_A
We have a browser based application written in PHP in which I want to drag-n-drop files from the windows explorer or directly email attachments(this would be very cool). On dropping the files in the browser application, it should save it on a particular folder on the server. Any help on how this can be achieved would be really appreciated.
JS or HTML5 would seem to be your best bets. But I have had trouble with d&d in MSIE (FF was ok). The downside is that HTML is not scheduled to be finalized until 2022(!) - you can expect support before then (even today), but it may not be consistent.
There is a good HTML demo here http://ljouanneau.com/lab/html5/demodragdrop.html
This will also allow you to d&d stuff from the browser to the PC (bi-directional)
I don't do JS so can't help you there, sorry (I'm a PHP guy too ;-)