1.Find your PHP ini file.
2.Run command “php --ini” to find loaded ini file.
3.Uncomment xdebug module.
3.Uncomment xdebug module.
zend_extension="/Applications/MAMP/bin/php/php7.0.8/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"
- 4.Set below settings for xdebug
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
5.Set-up debugger with PHPStorm
Open drop down and click on edit configuration as display in below screenshot.
Click on + icon and select PHP Web Page from the list.
Under Configuration section set Server details and for that click on
- Step-out, Step-into, Continue, Terminate
Step-out: F8
Step-Into: F7
Continue: F9
- Debugging step by step
- Inspect variables
- Watch variable
- Conditional debugging point
No comments:
Post a Comment