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?

4
  • Sanity check: did you configure NB to use xdebug? Commented Feb 27, 2012 at 13:42
  • No! I guess I assumed it would be configured when I installed NB. I'm sort of a newbie with all this :-) Commented Feb 27, 2012 at 13:48
  • 3
    Here's your tutorial then: wiki.netbeans.org/HowToConfigureXDebug ;) Commented Feb 27, 2012 at 13:50
  • Awesome! Just edited my php.ini file and it's now stepping through my code! Thanks Mchl Commented Feb 27, 2012 at 13:56

2 Answers 2

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

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

4 Comments

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?
I'm not sure about that one. You'd need to check xdebug docs I suppose.
Sounds good. Thanks for the quick & easy answer to my main question!
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
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/

1 Comment

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?"...

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.