Reputation: 3954
I've setup a CakePHP project in Netbeans and use xdebug for debugging. When I start a debugging session, Netbeans stops in the root index.php file on every request. I have to press continue and then my breakpoints are hit.
Is there a way to configure xdebug to avoid this behavior? It's pretty tedious having to hit continue on every request.
Thanks!
Upvotes: 4
Views: 2437
Reputation: 17581
Paul is correct. This is a netbeans issue, not CakePHP. Uncheck "Stop at First Line".
The larger issue that many people face is getting debugging working in general. If you set the index field as user787301 suggested, then the debugger will launch to webroot/index and throw an error. The solution is to only set Web Root in project properties -> sources as Sudhir suggested.
Upvotes: 1
Reputation: 5208
Sudhir's answer pointed me into the right direction.
The following worked for me:
Breakpoints finally working now!!! I am sooo happy XD
( PS. I just made the move from Windows to OS X. Whatever installation you are running, make sure you are editing the correct php.ini file. Even PHP veterans like myself sometimes still end up editing the wrong stupid file. )
Upvotes: 4
Reputation: 3954
Answer in another post: here. Issue was not specific to CakePHP, but rather PHP debugging in general with Netbeans.
Upvotes: 5
Reputation: 100175
Try setting web root folder to APP/webroot. Right click your project and choose properties, then set your source folder to webroot. Ref: cakePHP debug Netbeans
Hope it helps
Upvotes: 4