The best manual of how to use "The easiest Xdebug" addon for Firefox
Installation notes
0. Install the best Firefox add-on for remote debugging The easiest Xdebug. I'm not lying.
1. Install the xdebug extension from PECL or from a repo or download sources to compile it manually:
- git clone git://github.com/derickr/xdebug.git
- Xdebug downloads page
2. Compile the extension
- cd /xdebug/src/path
- /path/to/your/phpize
- ./configure --prefix=/php/installation/prefix --enable-xdebug --with-php-config=/path/to/your/php-config
- make -j4
- sudo make install
4. Configure Xdebug in your php.ini
- zend_extension="/path/to/installed/extension/xdebug.so"
- xdebug.remote_enable=true
- xdebug.remote_host=127.0.0.1
- xdebug.remote_port=10000 (port 9000 is occupied by FPM, but you can set another)
- xdebug.remote_autostart=1
- xdebug.idekey= (you can just leave it empty)
3. Make sure Xdebug was installed successfully
- /path/to/your/php -i | grep xdebug
4. Don't forget to configure your fastcgi-server if you use one (example of nginx server config):
- fastcgi_param PHP_IDE_CONFIG serverName=$server_name;
5. Don't forget to reload your web-server or php-fpm.
IDE configuration
- Configure your xdebug port (10000 is our case)
- Filter external connections if you don't want to accept debug requests from aside
-
Add server configuration of your site
-
Go to Run->Edit configurations. Add "PHP Remote Debug"
configuration, select your server (that you just added) and enter
IDE-key, a string that will filter debug data by debug-session name:
Action!
-
Select Run->Debug... and select your remote configuration name (as you named it above):
IDE now listens incoming connections on port 10000. (Hey, article writers, do you fucking know that IDE is a server here? Yes, xdebug sends data directly to IDE)
-
Confgure your addon in Firefox. Go to
Tools->Addons->Extensions->The easiest Xdebug and change your
IDE-key to selected one.
-
Open the site page that you want to debug and click the "bug" icon on your Addon Bar. It will become colorized and animated.
This means that session name is set and after page reloading IDE will stop at your first breakpoint (in this manual you will not find what it is).
Also there is a usefull page for checking cookies that the add-on sets: http://manual.pohape.ru/xtest/
参考:http://manual.pohape.ru/xdebug/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架