Home:ALL Converter>How to set a breakpoint in code to debug PHP

How to set a breakpoint in code to debug PHP

Ask Time:2021-12-15T16:02:59         Author:Gabriel Furstenheim

Json Formatter

I'm debugging a PHP process using xdebug CLI.

I can attach to the process and set up breakpoints using breakpoint_set. However, they need to be set each time and cannot be defined on the code itself.

Is there any way to set a breakpoint in code? Something like debugger in JavaScript? That is, I do not want to set the breakpoints in the IDE by clicking on the left, this is what all guides suggest.

Author:Gabriel Furstenheim,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70360190/how-to-set-a-breakpoint-in-code-to-debug-php
yy