Xdebug skips certain functions when debugging

so basically I use the Zend Framework autoloader to automatically load my functions. But because of this, whenever I debug, if I call any function, then xdebug goes to the autoload function before going to the actual function being called.

So, if I call the func() function, it will first go to autoload() , and then func() , which increases the debugging costs in terms of time, etc.

Ideally, if I call func (), it should go directly to func (), still using the autoloader.

Is there a way to tell xdebug (or use any PHP / Zend hack, etc.) to always skip a specific function (in this case my autoload function) when I debug it?

+4
source share
3 answers

If you are executing code once, then you really should use breakpoints. If you set a breakpoint at the beginning of the block of code under investigation, you can use the "run to breakpoint" option to skip all the code that runs before the code under investigation.

If you set a breakpoint at the beginning of the constructor of the class you want to investigate, or the beginning of the method you want to investigate, if you are sure that the object instance is in order, you can skip the autoloader.

Netbeans and Eclipse PDT support setting breakpoints by simply clicking the line number of the code you want to examine.

In addition, the debugger also has the "exit" option, which allows you to jump out of the function / method that you jumped into using the "step in" option. If you find yourself in the autoloader, just exit it.

+1
source

In eclipse with pdt in the settings: PHP → Debug → Filtering steps, click "Add Filter", I added Autoloader.inc and you no longer need to go through it.

See step_filtering_preferences for more details.

+6
source

I know this is an old question, but I came here from Google. In phpStorm, you can ignore a specific function by adding it to:

Settings> PHP> Debugging> Step Filters

c → if it is a non-static method or :: if it is static

phpstorm preferences

0
source

All Articles