有很多答案可以解决这个特殊问题。我想你还没有(重新)搜索过它。而且在调试代码时你会犯一些错误。为了解决问题,请遵循以下步骤。
您的X-Debug配置看起来正确 php.ini 文件。但是看看我对你的这个小改动。
php.ini
zend_extension = C:\xampp\php\ext\php_xdebug-2.6.0beta1-7.2-vc15.dll xdebug.extended_info = on xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_host = "localhost" ; <-- "localhost" instead of 127.0.0.1 xdebug.remote_port = 9000 xdebug.remote_autostart = 0 ;xdebug.remote_connect_back = 0 xdebug.trace_output_dir = "C:\xampp\tmp" xdebug.remote_log = "c:\xampp\php\logs\xdebug.log" xdebug.idekey=netbeans-xdebug
在运行配置中,您需要设置您的 的 项目网址 强> 代替 http://localhost:9000/ 。端口号9000意味着XDebug的用途。所以,将运行配置改为这样的,
http://localhost:9000/
http://localhost/<your_project_name>/index.php
现在请注意,
xdebug.remote_host = "localhost"
http://localhost
http://127.0.0.1
localhost
127.0.0.1