Debugger derailed by clever call

Trying to debug a project where the debugger can't work out where it is at some stages.
Main debugging is fine, but there's a part where we have a call like this:

$methodName = "registerUser"; // only an example
$result = $this->commandHandler->{$methodName}($cmd, $eso);

If we do just
$result = $this->commandHandler->registerUser($cmd, $eso);
then it works fine.

Is there a way I can tell the debugger where it is?



Are you using X Debug or Zend debugger engine?..


Well, execution point is reported by debugger engine so I suppose this is xDebug error. You may try to search for solution on their resources.

We'll invesitgate this additionally from our side though..


Hello Alex,

Can you please provide debugging log?


PS Alternatively to turning log on PhpStorm side, you may do it for Xdebug:


Thanks for the offer of a look, but...
a) I didn't tell you the full gory details of what we did (my excerpt was somewhat simplified)
b) We've changed the cleverness of the code such that it now works.

The thing was that we were loading a class definition into memory, doing a string substitution to change its name and then evaluating it.
Poor debugger - didn't stand much of a chance, really!

We've now taken to giving it the final name in the source code...


Please sign in to leave a comment.