Magento development environment on windows with debug capability

I have seen hundreds of post on how to setup an Magento development environment for Windows. But nowhere i could find a good tutorial on this works with proper debugging enabled. I have tried many IDE’s and debugging frameworks (Zend, Xdebug) but i can’t find a way to actually get this to work.

It would be great if i could set a break-point in an .phtml file so i can see what is going on and check all variables/objects.

Any (experienced) Magento developers who can explain on how to setup a proper development environment for Magento on a windows machine.

Hope to get some feedback….

One thought on “Magento development environment on windows with debug capability”

  1. Here is a simple step-by-step

    1. Download the latest version of Z:WAMP
    2. Extract Z:WAMP wherever you like.
    3. Download the XDebug DLL
    4. Copy the XDebug DLL to {zwamp directory}/vdrive/.sys/php/ext/
    5. Add the following text to the bottom of the {zwamp directory}/vdrive/.sys/php/php.ini file
      [xdebug]
      zend_extension="/.sys/php/ext/php_xdebug-2.1.0RC1-5.3-vc9.dll"
      xdebug.remote_enabled=1
      xdebug.remote_connect_back=1
      
    6. Run {zwamp directory}/zwamp.exe and accept the security messages for Apache and Mysql.
    7. Delete everything under {zwamp directory}/vdrive/web/
    8. Copy your magento project into the {zwamp directory}/vdrive/web/ directory
    9. Download the latest version of NetBeans PHP and install it.
    10. Start netbeans and click File > New Project
    11. Click the PHP Category, Select the PHP Application with Existing Sources option
    12. Click Next
    13. Click Browse on the Sources Folder option
    14. Select the {zwamp directory}/vdrive/web directory
    15. For PHP Version, Select version 5.3
    16. Click Next
    17. For Project URL enter “http://127.0.0.1/” (Magento had/has a problem with names that do not have a TLD)
    18. Click Finish
    19. Wait for the Scanning Projects.. to finish (bottom right status bar, it takes a while)
    20. Open a code file, add a breakpoint, and run in debug mode (Ctrl-F5).
    21. Profit!

    To turn off the ‘break on start’ option

    1. Select Tools > Options
    2. Select PHP
    3. Select the General tab
    4. Under Debugging, un-check the Stop at first line option
    5. Click Ok

Leave a Reply

Your email address will not be published. Required fields are marked *