1

I'm developing a CakePHP project and i need to debug the project with Netbeans debug tools. I have used this post to configure debugging but it does not work. Break points are not hit.

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

Project Location

D:\wamp\www\MoDACA

PHP Debugging Options (in Tools > Options )

Debugger Port: 8080
Session ID: netbeans-xdebug
Max Data Length : 2048
Stop at First Line : True

NetBeans Run Configuration

Project URL: http://localhost:8080/MoDACA/
Index File: index.php

Advanced Settings

Debug URL : Ask Everytime
Debugger Proxy
Host: empty Port: 9001
Warning - Path Mapping might be needed.

The project is set as the Main Project. I set the break point in the StudentsController in function editStudent. When i clicki debug i set the specific URL as

http://localhost:8080/MoDACA/students/editStudent/1

I have done the above configuration but when i set the break point in side the editStudent function it is not hit. Can someone please help?

2 Answers 2

3

Make sure you have selected Web Root folder in the project properties.

In the Projects panel right click your project, then select Properties, then on the Sources tab on the left select your Web Root folder by clicking "Browse" beside it. By default it should be app/webroot

Sign up to request clarification or add additional context in comments.

Comments

0

Add Path Mapping in Project properties -> Run Configuration -> Advanced. Server Path is file system path on remote server, not web server path. So, if your project is in C:/Projects/my_cake_php_project and on remote server it's in /var/www/mydomain.com your mappings should be:

Server Path: /var/www/mydomain.com/
Project Path: C:/Projects/my_cake_php_project

At least it works for me ;-) Make sure that those paths are really saved On NetBeans 8.0.1 if you're still editing Server Path/Project Path and click 'OK' paths won't be saved.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.