New in 4.0: Easier debugging of remote PHP command line scripts
Many of PhpStorm users like to debug their PHP web applications and local command line scripts using our zero-configuration debugging approach due to its simplicity and comfort. This time we would like to announce that since PhpStorm 4.0 you can use this approach for debugging remote PHP command line scripts.
For those who are not familiar with PhpStorm debugging features yet, this type of debugging uses the ‘Listening’ mode and doesn’t require any run configuration or any other extra actions.
Zero-configuration debugging is based on analyzing your environment variables. Therefore it is hard to support debugging of remote PHP command line scripts in the listening mode because there is no definite way to detect the path mapping configuration to be used for such debug sessions.
You, our users, have asked us to provide a way to debug remote PHP command line scripts using the listening mode (see WI-7906) and we’ve implemented a generic mechanism to specify the path mapping configuration to use.
To tell PhpStorm which path mapping configuration it should use for a connection from a certain machine you need to set the value of the “PHP_IDE_CONFIG” environment variable to “serverName=SomeName”, where ‘SomeName’ is the name of the server configured in ‘Project Settings | PHP | Servers’. And that is all!
Please note that it will work for any debug connection (both for web applications and command line scripts) because this check has the highest priority in the path mapping detection algorithm.
Here are some possible problems you can encounter when debugging remote PHP debugging command line scripts:
- Your PHP CLI interpreter might use another php.ini configuration file than the one installed on the web server. Run PHP with the ‘–i’ option to check which configuration files it actually uses (see the official documentation for details).
- (Xdebug only) Please ensure that ‘xdebug.remote_connect_back’ configuration option is disabled. Thanks to Joshua Johnson for the hint.
Develop with pleasure!
Working with Windows Azure SQL Database in PhpStorm
PhpStorm provides us the possibility to connect to Windows Azure SQL Database right from within the IDE. In this post, we’ll explore several options that are available for working with Windows Azure SQL Database (or database systems like SQL Server, MySQL, PostgreSQL or Oracle, for that matter): …
Change signature refactoring in PhpStorm
A very powerful refactoring is the Change signature refactoring in PhpStorm. It enables us to modify a function signature in many ways: we can change the function name, change its visibility, add, remove and reorder parameters as well as rename parameters. (more…)…
Folding for imports in PhpStorm 6.0
In PhpStorm 6, we've introduced code folding for imports. Any list of imports will now be folded into a single line. This greatly reduced clutter in your editor when having a lot of imports! (more…)…
Drag & Drop Project Files to Remote Hosts in PhpStorm
The Remote Host pane allows us to work directly on a remote server through FTP, FTPS, SFTP or a local/network folder. A lot of people asked us to add drag & drop to the Remote Host pane in PhpStorm. Good news: PhpStorm 6 comes with drag & drop as well as copy & paste support from the pro…