2

I want to debug Magento code for learning Magento. I have Magento installed on XAMPP (windows XP sp2).I have installed Netbeans(php version) and configured xdebug.

In netbeans I selected "php application with existing sources".Then I created a folder "myFolder" in C:\xampp\htdocs for the purpose of exporting the Magento code .

Now I want to know that In the 'name and location panel'(in Netbeans) would setting the "source folder" field to "C:\xampp\htdocs\magento" be right('Magento' is the directory under which Magento is installed)?

Also what should I enter in the "copy to folder" field under the "run configuration" panel, should I enter "C:\xampp\htdocs\myFolder" and if I do this then would the entire Magento code would be exported to "myFolder".

Please help I would be very thankful.

  • 1
    This question appears to be off-topic because it not about Magento. – Marius Nov 17 '13 at 15:07
  • I have the same issue.. can't debug magento.. would be great if someone answer this even it looks off-topic. – Mr_Green Nov 17 '13 at 15:33
5

In order to debug PHP scripts in NetBeans, you need to :

  • Install the XDebug extension: Download the correct .dll from http://xdebug.org/download.php and copy it into your D:\xampp\php\ext directory

  • Add the following lines to your php.ini file:

    [XDebug]
    zend_extension = "D:\xampp\php\ext\your_php_xdebug.dll"
    xdebug.profiler_output_dir = "D:\xampp\tmp"
    xdebug.remote_enable = 1
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1"
    xdebug.trace_output_dir = "D:\xampp\tmp"
    
  • Restart the Apache webserver

  • From NetBeans Tools->Options->Debugging, set Debugger port and Session ID to 9000 and netbeans-xdebug respectively. Create a run configuration and hit the Debug button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.