I think this article is more a note for myself then a real serious blogpost.
For example: a call for the symfony console could look like this:
For all these options you have to keep in mind, that you should tell your IDE to be in debug mode and you should also set at least one meaningful debugging point
For configuring php storm
here a a link with a good desciption: https://www.jetbrains.com/help/phpstorm/2016.1/configuring-xdebug.html?origin=old_helpHere is my current xdebug config taken from xdebug.ini
[xdebug] zend_extension="/usr/local/opt/php56-xdebug/xdebug.so" xdebug.profiler_output_dir=/tmp xdebug.profiler_enable_trigger=1 xdebug.remote_enable=1 xdebug.remote_autostart=0 xdebug.remote_connect_back=0 xdebug.remote_host="localhost" xdebug.idekey=XDEBUG xdebug.remote_port=9000 xdebug.remote_handler="dbgp"
Running from a browser with Extension
For the chrome browser you can install this extension: xdebug-helper
Running from Postman
Postman is a nice tool for performing requests and see what comes back.
Add a simple query parameter to your url:
?XDEBUG_SESSION_START=PHPSTORM
Running from Console
Sometimes you want to debug scripts that were executed from console for that you can pass a parameter:
-dxdebug.remote_autostart=On
For example: a call for the symfony console could look like this:
php -dxdebug.remote_autostart=On bin/console
Keep in Mind
For all these options you have to keep in mind, that you should tell your IDE to be in debug mode and you should also set at least one meaningful debugging point
Dieser Kommentar wurde vom Autor entfernt.
AntwortenLöschenI prefer to use Codelobster IDE for debugging
AntwortenLöschen