so basically I'm using Zend Framework's autoloader to autoload my functions. But because of this whenever I'm debugging, if I call any function xdebug would go to the autoload function before going to the actual function that is being called.
So if I call the function func()
, it will first go to autoload()
and then func()
which increases debugging cost in terms of time, etc
Ideally if I call func(), it should go directly to func() while still using the autoloader.
Is there a way to specify xdebug (or using any PHP/Zend hack etc) to always skip a certain function (in this case my autoload function) when I'm debugging?
If you're single-stepping through your code, then you really should consider using breakpoints. If you set a breakpoint at the start of the code block under investigation, then you can use the "run to breakpoint" option to skip over all the code that runs prior to the code under investigation.
If you set a breakpoint at the start of the constructor of the class you want to investigate, or the start of the method you want to investigate if you are sure the object instantization is okay, then you can skip through the autoloader.
Netbeans and Eclipse PDT both support setting breakpoints simply by clicking on the line number of the code you want to investigate.
Additionally, there's also the "step out" option in the debugger that lets you jump out of a function/method into which you have jumped using the "step in" option. If you find yourself in the autoloader, just step out of it.