Home > Article > Backend Development > Construction of mac sublime3+xdebug+firefox debugging environment
Step one: configure php xdebug extension
[xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey="sublime.xdebug"
xdebug.remote_log="/var/log/xdebug/xdebug.log"
Second Step: Install sublime xdebugclient (not xdebug)
Step 3: Install php xdebug extension
Install sublime xdebug client in sublime, you must install the one with client here, not sublime xdebug. Note that after the installation is complete, press ctrl+shift+p in sublime and enter xdebug. If the following options appear, the installation has been successful.
Step 4: Configure sublime xdebug
Use sublime to open the program you want to debug, and click Project->save project as in the sublime navigation. Generate a .sublime-project file and modify it to:
The following is my MAC configuration
{
"folders":
[
"{
"path": "/Applications/xampp/xamppfiles /htdocs"
}
],
"settings":
{
"xdebug": {
"path_mapping": {
},
"url": "http://127.0.0.1/test.php",
"super_globals": true,
"close_on_stop": true,
"port": 9000
}
}
}
Step 5: Download the firebox plug-in easiest , if you don’t click to open it for the first time, debugging will be invalid. Step 6: Test debugging. After adding a breakpoint to the file to be debugged, start debugging in tools --> xdebug --> in sublime. At this time, open the URL set in the above configuration steps in the browser: http://127.0.0.1/test.php, enter the breakpoint, and complete debugging.
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the establishment of mac sublime3+xdebug+firefox debugging environment, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.