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) Magent开发者_StackOverflow社区o developers who can explain on how to setup a proper development environment for Magento on a windows machine.
Hope to get some feedback....
Here is a simple step-by-step
- Download the latest version of Z:WAMP
- Extract Z:WAMP wherever you like.
- Download the XDebug DLL
- Copy the XDebug DLL to {zwamp directory}/vdrive/.sys/php/ext/
- 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
- Run {zwamp directory}/zwamp.exe and accept the security messages for Apache and Mysql.
- Delete everything under {zwamp directory}/vdrive/web/
- Copy your magento project into the {zwamp directory}/vdrive/web/ directory
- Download the latest version of NetBeans PHP and install it.
- Start netbeans and click File > New Project
- Click the PHP Category, Select the PHP Application with Existing Sources option
- Click Next
- Click Browse on the Sources Folder option
- Select the {zwamp directory}/vdrive/web directory
- For PHP Version, Select version 5.3
- Click Next
- For Project URL enter "http://127.0.0.1/" (Magento had/has a problem with names that do not have a TLD)
- Click Finish
- Wait for the Scanning Projects.. to finish (bottom right status bar, it takes a while)
- Open a code file, add a breakpoint, and run in debug mode (Ctrl-F5).
- Profit!
To turn off the 'break on start' option
- Select Tools > Options
- Select PHP
- Select the General tab
- Under Debugging, un-check the Stop at first line option
- Click Ok
精彩评论