Last active
October 16, 2023 08:00
-
-
Save arif98741/86c111c498aa718b4d201fab7f01e0b1 to your computer and use it in GitHub Desktop.
Debugging Configuration in PHPSTROM XDEBUG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Xdebug in PHP | |
Now it’s time to install Xdebug in PHP. There are a few options through which you can install Xdebug. | |
Windows: | |
For windows users, Xdebug is providing a wizard tool through which you can download the related .dll file. For this, first, create a PHP file in folder, and add the following line of code: | |
<?php | |
phpinfo(); | |
?> | |
Run the file in the browser. You will see the PHP information. Copy the details and put them in the wizard tool and click on Analyze my phpinfo() output button. | |
Demo screenshot: https://www.cloudways.com/blog/wp-content/uploads/find-package-xdebug.png | |
Xdebug wizard page for putting your phpinfo data and generate .dll | |
https://xdebug.org/wizard | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;zend_extension=opcache add this debug inside your php.ini configuration. this is applicable for Xdebug 3.* | |
; xdebug entension | |
zend_extension = xdebug | |
xdebug.profiler_enable = 1 | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 1 | |
xdebug.idekey = PHPSTORM | |
xdebug.remote_port = 9000 | |
xdebug.scream = 0 | |
xdebug.cli_color = 1 | |
xdebug.show_local_vars = 1 | |
xdebug.mode=debug | |
xdebug.client_host=127.0.0.1 | |
xdebug.client_port=9000 | |
xdebug.log=/tmp/xdebug.log | |
xdebug.remote_autostart=On | |
;xdebug.default_enable = 1 | |
;xdebug.remote_host = localhost | |
#try to debug using firefox and it's extension xdebug. This will popup a window to select file. |
Author
arif98741
commented
Sep 19, 2022
query param
?XDEBUG_SESSION=1
You should add ?XDEBUG_SESSION=1 as query string for the first time during running xdebug with browser. Otherwise it may not work . That means you should add it.
Go to this link if you want to install in vscode or other os
https://www.cloudways.com/blog/php-debug/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment