By default PHPStorm (which I love, BTW) collapses header comments. I think this is not a safe default, as I use header comment to give my fellow developers (or my future self) an overview about the file they’re going to read.
To deactivate this behavior, just go to Settings > Editor > General > Code Folding and uncheck File Header
I was playing with Symfony recently, and I needed to setup debug in PHPStorm using the PHP internal web server.
I’ve setup xdebug with PHPStorm in multiple environments, and each time I find a different glitch. Lucky me 🙂
So, I will assume that you have PHP, xdebug, PHPStorm installed.
These are the steps:
- Edit the xdebug configuration file (in Ubuntu you can find it in
/etc/php5/cli/conf.d/20-xdebug.ini) and add the following lines:
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
- Start the server with
php bin/console server:run
- In PHPStorm, click the phone handle icon.
- Set a breakpoint and load your application in the browser.
You’re done! Can you believe it?
This time the difference was that
Until for next xdebug setup tip, bye 😉
Everyone should know how to get the most out of his working tool. To me, it’s the editor I use to code. That’s not the case for many of my fellow programmers, who know just the basic stuff.
That’s why I’ve decided to realize these little tips. Here’s the first one, on how to automatically declare a class field.
I hope you enjoy the show.