Reputation: 1759
Just like how variables values can be changed while stepping through code lines. Is it possible to add PHP statements between lines and let it run further after picking that up change?
Probably not even possible as the state of the codebase is already loaded into memory when it starts executing but I think it was worth a try.
Upvotes: 3
Views: 64
Reputation: 36784
Xdebug can do this. It's the exact same mechanism in the DBGp protocol as updating variables. This happens with the DBGp "eval" command, which as you can guess, runs PHP's eval function.
But it depends on the IDE whether they actually have implemented this. PhpStorm for example has its console, which is also a wrapper for this eval command. You can probably get away by using a real PHP statement in a "watch" as well.
Upvotes: 2