How can I debug my php code?

how do I debug my PHP code in Netbeans?

  • I am just beginning my journey into PHP world and I chose Netbeans editor. I am using the latest one i.e V7.0.1 and setup WAMP. However, I don't quiet understand how will I debug my PHP code? My breakpoints don't get hit in Netbeans. Any help would be useful. Thanks.

  • Answer:

    I would recommend using http://xdebug.org/. Read about http://xdebug.org/docs/remote, this integrates with NetBeans.

Jaggu at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

In addition to debugging, learn how to profile your code with XDEBUG. You can configure Xdebug so there is a switch ?XDEBUG_PROFILE added to your URL, which will record the precise time of each statement. Install webgrind to see detailed reports in your browser. WAMP may already have it installed, just look in your PHP.INI file. If not visit the XDEBUG site. Learn how to write efficient code from the start :)

Len

See this document: http://netbeans.org/kb/docs/php/debugging.html Or more generally, the PHP Learning Trail: http://netbeans.org/kb/trails/php.html

Petr Jiricka

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.