5

I have an application I'm working on in which I make many AJAX calls to external PHP files. These PHP files get certain parameters, connect to the DB, and perform a task with them.

I just recently started using Netbeans for an IDE and love it thus far. However, whenever I put a breakpoint on one of my external PHP files (the ones I'm making AJAX requests to) and attempt to run the debugger, my breakpoints are never hit. Am I doing something wrong? Or does the Netbeans debugger not stop on the breakpoints of external files you are referencing?

Mchl
  • 61,444
  • 9
  • 118
  • 120
FastTrack
  • 8,810
  • 14
  • 57
  • 78

2 Answers2

5

NetBeans need to be configured to use xdebug, before you can strt debugging. For instructions on installing and configuring xdebug see here: http://wiki.netbeans.org/HowToConfigureXDebug

Mchl
  • 61,444
  • 9
  • 118
  • 120
  • Thanks a million! Quick question - when I Run with Debugging, the debugger pauses at the beginning of each different file the application uses. Is there a way to auto-run through all my code up until it reaches the breakpoint? – FastTrack Feb 27 '12 at 14:10
  • I'm not sure about that one. You'd need to check xdebug docs I suppose. – Mchl Feb 27 '12 at 14:29
  • Sounds good. Thanks for the quick & easy answer to my main question! – FastTrack Feb 27 '12 at 14:33
  • 3
    Just found the answer to my smaller question. For anyone wondering: to stop the debugger from pausing on the first line of each file, go to Tools >> Options >> PHP >> Debugging and uncheck the Stop at First Line option – FastTrack Feb 27 '12 at 16:53
3

Here is a nice step-by-step tutorial for setting this up. A little less wordy than the netbeans documentation:

http://arturito.net/2011/05/21/local-and-remote-php-debuging-in-netbeans-with-xdebug-on-google-chrome-just-like-in-visual-studio/

jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
  • Perfect conlusion! A "_little less wordy_", LOL! :] When I saw Netbeans docs I thought: "_What? They expect me to read all this blah, blah, blah over few pages to debug with Xdebug?_"... – trejder May 17 '13 at 09:13