我正在开发一个CakePHP项目,我需要使用Netbeans调试工具来调试这个项目。我使用这 post来配置调试,但它不起作用。断点没有命中。
php.ini
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=8080
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/wamp/tmp"
xdebug.show_local_vars=0项目位置
D:\wamp\www\MoDACAPHP调试选项(在工具>选项中)
Debugger Port: 8080
Session ID: netbeans-xdebug
Max Data Length : 2048
Stop at First Line : TrueNetBeans运行配置
Project URL: http://localhost:8080/MoDACA/
Index File: index.php高级设置
Debug URL : Ask Everytime
Debugger Proxy
Host: empty Port: 9001
Warning - Path Mapping might be needed.该项目被设定为主要项目。我在函数StudentsController中设置了editStudent的断点。当我单击调试时,我将特定的URL设置为
http://localhost:8080/MoDACA/students/editStudent/1我已经完成了上面的配置,但是当我在editStudent函数旁边设置断点时,它不会被击中。有人能帮忙吗?
发布于 2015-10-06 05:08:53
确保已在项目属性中选择了“Web根”文件夹。
在“项目”面板中,右键单击项目,然后选择“属性”,然后在左侧的“源”选项卡上单击“浏览”选择Web根文件夹。默认情况下应该是app/webroot
发布于 2014-09-30 10:20:11
在项目属性中添加路径映射,->运行配置->高级。Server Path是远程服务器上的文件系统路径,而不是web服务器路径。因此,如果您的项目位于C:/Projects/my_蛋糕_php_ project中,并且在远程服务器上位于/var/www/mydomain.com中,您的映射应该是:
Server Path: /var/www/mydomain.com/
Project Path: C:/Projects/my_cake_php_project至少它对我有用;-)如果您仍然在编辑服务器路径/项目路径,并单击'OK‘路径将不会保存这些路径,请确保这些路径在 8.0.1上确实保存了。
https://stackoverflow.com/questions/25348268
复制相似问题