Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Step Through (Debug) PHP Code in Netbeans

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?

like image 521
FastTrack Avatar asked Feb 27 '12 13:02

FastTrack


People also ask

Can you debug PHP?

You can start debugging without any configuration. But, this is only suggested when you need to connect to an existing Web Server with Xdebug configured or want to run and debug a PHP script rapidly.


1 Answers

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

like image 150
Mchl Avatar answered Oct 04 '22 04:10

Mchl