PhpStorm 2017.1 Brings New Debugger Improvements

Debugging has always been a very important part of PhpStorm, and the 2017.1 release continues our quest to improve the debugger experience.

We’re continually tweaking and improving the debugger to make your debugging experiences as painless as possible, and this latest release is no exception.

Firstly, global constants are now grouped together to try and help you find exactly what you’re looking for in the global scope. This helps a lot, particularly in projects that have a lot of constants and variables in the global scope (like WordPress).

debugging-constants

When you’re debugging you often would like to know what type of class is held in a variable, and jump to the definition of that class. PhpStorm 2017.1 lets you do that by right-clicking on the variable in the Variables pane and selecting Copy Type or Jump to Type Source.

debugging-jump-to-type

If you use Evaluate Expression a lot, you’ll have noticed that when you copy code from the scope of the edit pane into the evaluate expression pane, the namespace directive and imports from the use directives are not taken into account, meaning the result of your evaluations can be different in the Evaluate Expression window from the actual code. In PhpStorm 2017.1 we now take these into account meaning you get more consistency when using this tool. If you want to turn this feature off, you can use the PHP | Debug | Import namespace and use statement from evaluation context setting.

We’ve also tweaked the way we display debug settings to hide some little-used preferences under the Advanced section. Since we started our mission to simplify the configuration of the debugger a lot of the settings that would have needed to be changed by users are now only required in complex cases, and so hiding them makes it less confusing for everyone. We’ve also added a new pre-configuration pane that helps you to understand the minimal steps needed to get debugging working, which is useful as a reminder when you’re setting up a new project.

debugger-pre-config

– Gary & The PhpStorm Team

About Gary Hockin

Gary Hockin has been creating code to power web applications for 15 years, the last three of them at an extraordinary level. He is handsome, talented, funny and articulate, and also extremely modest. Gary is a valued contributor to Zend Framework 2 and is a member of the community review team. He's married and has two wonderful children, and when he's not coding, writing about code, speaking about code or reading about code, he can usually be found in the pub playing pool.
This entry was posted in Cool Feature, Newsletter. Bookmark the permalink.
  • Geoff Kendall

    A vital part of the pre-configuration for 99% of people working on remote servers is that a user needs to forward traffic received for Xdebug to their own machine using the port forwarding on their office/home router. Without that, nothing happens. I’d stop calling it “zero-configuration debugging”, as it’s one of the trickier things I’ve had to configure, took a lot of googling and cross-referencing to get up and running.

    • Vladimir Luchansky

      Totally agree, networking issues may be really painful – of course guides are written mostly for cases with direct communication and we hope people who don’t have this direct connection would know about this.
      Or, for example, you can simply set up a direct tunnel between the server and your machine: https://confluence.jetbrains.com/display/PhpStorm/Remote+debugging+in+PhpStorm+via+SSH+tunnel. This would still make it almost-zero-configuration.