简体   繁体   English

无法在 Intellij 中为 PHP 设置 xdebug

[英]Unable to setup xdebug for PHP in Intellij

I am trying to setup the debugger using xdebug and IntelliJiDEA 14.0.4 with my PHP application that runs at my localhost for Unit Testing and tracing.我正在尝试使用 xdebug 和 IntelliJiDEA 14.0.4 以及我的 PHP 应用程序设置调试器,该应用程序在我的本地主机上运行以进行单元测试和跟踪。 i have tried my best but could not able to locate where is the issue.我已经尽力了,但无法找到问题出在哪里。

My phpinfo page shows xdebug support enabled Version 2.4.0.我的 phpinfo 页面显示启用了 xdebug 支持的版本 2.4.0。 It is the same version suggested by https://xdebug.org/wizard.php它与https://xdebug.org/wizard.php建议的版本相同

In IntelliJ I have Run/Debug configrations I have configured "PHP Web Appication" with Start url - http://localhost:8081/baskar/index.php Servers - 172.20.65.71 : 9000 xdebug In Validate remote environment - i have given deployment server as Local and validation script path as C:\\dev\\baskar\\Validation.在 IntelliJ 中我有运行/调试配置我已经配置了“PHP Web Appication”与开始 url - http://localhost:8081/baskar/index.php Servers - 172.20.65.71 : 9000 xdebug 在验证远程环境中 - 我已经给出了部署服务器作为本地和验证脚本路径为 C:\\dev\\baskar\\Validation。 On validate I am getting !No php.ini file was found !No debug extension is loaded在验证我得到!没有找到 php.ini 文件!没有加载调试扩展

My php.ini file settings:我的 php.ini 文件设置:

extension=php_oci8_11g.dll ;扩展名=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client zend_extension=C:/dev/php_5.4/ext/php_xdebug-2.4.0-5.4-vc9.dll [xdebug] xdebug.remote_enable=true xdebug.remote_port=9000 xdebug.profiler_enable=1 xdebug.remote_host=172.20.65.71 xdebug.profiler_output_dir="C:\\dev" xdebug.remote_log=C:\\dev\\php_5.4\\xdebug.log与 Oracle 11gR2 Instant Client 一起使用 zend_extension=C:/dev/php_5.4/ext/php_xdebug-2.4.0-5.4-vc9.dll [xdebug] xdebug.remote_enable=true xdebug.remote_port=9000 xdebug.profiler_enable=1 xdebug。 remote_host=172.20.65.71 xdebug.profiler_output_dir="C:\\dev" xdebug.remote_log=C:\\dev\\php_5.4\\xdebug.log

Please guide me where I went wrong or let me know if you need anyother info.请指导我哪里出错了,或者如果您需要任何其他信息,请告诉我。 Thanks in advance!!!提前致谢!!!

I know this is old, but I would like to provide a generic solution for a very common problem.: Intellij Ultimate 2018.3 has an excellent Pre-configuracion instructions, with validation (check step 1).我知道这是旧的,但我想为一个非常常见的问题提供一个通用的解决方案。:Intellij Ultimate 2018.3 有一个很好的预配置说明,带有验证(检查步骤 1)。 Open settings (CTRL+ALT+S) and find it following the selected option in the capture:打开设置 (CTRL+ALT+S) 并在捕获中的选定选项后面找到它:

php调试向导

Take your time, all you need is in these configurations steps.慢慢来,您需要的只是这些配置步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM