J
J
JSmitty2015-08-15 15:55:50
PHP
JSmitty, 2015-08-15 15:55:50

XDebug in PHPStorm - how to skip autoloader?

The question arose - when debugging a project, it is very annoying that the debugger constantly "falls through" into the composer's autoloader. I would like to configure everything so that the autoloader is skipped (well, that is, step over was performed for it, not step into).
Initial:
PHPStorm 9.0.1 + PHP 5.4.35 + XDebug 2.2.6 (server - OpenServer 5.2.2, Apache 2.2 is configured as a web server).
I tried to configure Languages ​​& Frameworks > PHP > Debug > Step Filters in the storm in this way - I add (according to the documentation of Step Filters the line:

\Composer\Autoload\ClassLoader->loadClass

And nothing happens. The debugger still walks into the loadClass method when accessing an "unfamiliar" class. How to overcome?
PS Googling showed that in PDT for eclipse it was done not by class methods, but by files , and such as the autoloader is really ignored for entry.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2015-08-15
@JSmitty

in PHPStorm 9 it is possible to configure the functions to be skipped.
Take a closer look at the debugging panel.
Unfortunately Phpstorm 9 is not available at the moment to take a screenshot.

J
JSmitty, 2015-08-15
@JSmitty

Oleg, thanks for the tip, yes - there is an Add method to skip list button, which clearly shows that PHPStorm considers this option to be a fully qualified name:
contrary to what is stated in the documentation :
And the first option does work... kind of. But calls from a skipped method still run in Step Into mode, so the solution to ignore Composer's autoloader in general is:

Composer\Autoload\ClassLoader->loadClass
Composer\Autoload\ClassLoader->findFile
Composer\Autoload\ClassLoader->findFileWithExtension
Composer\Autoload\includeFile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question