Search code examples
phpdebuggingphpstorm

Possible to edit script during debugging in PhpStorm?


I have a PHP script that I am debugging in PhpStorm. I'd like to edit lines below the current breakpoint / cursor, then Continue or Step Over and have the changes reflected immediately. Is that possible? PhpStorm seems to be evaluating using the original code, not the updated one.


Solution

    1. Current versions of PhpStorm do not have such functionality

    2. "PhpStorm seems to be evaluating using the original code, not the updated one."

      Well... PhpStorm does not actually execute your code -- it's done by PHP itself + xdebug which controls/provides debugging.

      Therefore the Question is -- does PHP itself (or debug extension) supports such "hot-swap"? AFAIK -- no.

    3. Considering all the above I may only suggest to try latest EAP builds of PhpStorm v10 -- they now support interactive debugging: 1, 2