set -x (bash) equivalent for PHP?
Good evening!
I'm looking to debug PHP code, I would normally go by the means of: echo "Step 1\n"; And/or using print_r / var_dump on specific variables.
But is there a 'set -x' ( bash ) equivalent for PHP?
That would make things a lot easier at times, at least it has helped me troubleshoot bash scripts.
If there isn't, what would be my best next steps to debug vanilla php mixed with some packages added with composer ( OOP coded parts )
Thanks in advance.
Posted Sep 12, 2022, 5:42 PM UTC
Run with xdebug extension installed and activated. Set break points. Step trace. Easily done with phpstorm.
Thanks! Will look into xdebug, I use VSCode but probably will be able to get there too without PHPStorm 👍🏻
gl&hf