<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Santakrish&#039;s Tech Talks</title>
	<atom:link href="http://santakrish.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://santakrish.wordpress.com</link>
	<description></description>
	<lastBuildDate>Fri, 10 Sep 2010 13:52:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='santakrish.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Santakrish&#039;s Tech Talks</title>
		<link>http://santakrish.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://santakrish.wordpress.com/osd.xml" title="Santakrish&#039;s Tech Talks" />
	<atom:link rel='hub' href='http://santakrish.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Debugging Drupal Using Eclipse &amp; Zend Debugger</title>
		<link>http://santakrish.wordpress.com/2010/09/07/eclipse-drupal-zend/</link>
		<comments>http://santakrish.wordpress.com/2010/09/07/eclipse-drupal-zend/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 17:36:08 +0000</pubDate>
		<dc:creator>santakrish</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Xampp]]></category>
		<category><![CDATA[Xdebug]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend Debugger]]></category>

		<guid isPermaLink="false">http://santakrish.wordpress.com/?p=1</guid>
		<description><![CDATA[It has been a while a thought of standardizing a good development Environment for Drupal with Debugger options was hitting my head a lot. My basic idea is to totally eradicate usual debugging practice of using print_r, echo, var_dump or exit statement, Google searches provided options of using Eclipse with Xdebug or Zend Debugger. With [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=santakrish.wordpress.com&amp;blog=15711071&amp;post=1&amp;subd=santakrish&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">It has been a while a thought of standardizing a good development Environment for Drupal with Debugger options was hitting my head a lot. My basic idea is to totally eradicate usual debugging practice of using print_r, echo, var_dump or exit statement, Google searches provided options of using Eclipse with Xdebug or Zend Debugger. With Few hours of analysis and Unknown Apache Crashes at last i was able to setup Environment on my Windows Machine. Following are the prerequisites Tools i have used as my standard Development Environment.</p>
<ul>
<li>Xampp</li>
<li>PDT</li>
<li>Zend Debugger</li>
</ul>
<h2 id="installmampwithxdebug">Install Xampp with Zend Debugger</h2>
<ol>
<li>Download &amp; Install latest Xammp Server &#8211; Instruction for Installing &amp; Configuring are available @ http://www.apachefriends.org/en/xampp-windows.html ( <em>by default Xampp comes with Zend Optimize</em>r)</li>
<li>In my Local machine i have installed Xampp package @ c:\xampplite</li>
<li>Next is to download and Configure Zend Debugger -  The new location for downloading the Zend debugging PHPextension is <a title="http://www.zend.com/products/studio/downloads" href="http://www.zend.com/products/studio/downloads">http://www.zend.com/products/studio/downloads</a> or we can use the old location  <a title="http://downloads.zend.com/pdt/server-debugger/" href="http://downloads.zend.com/pdt/server-debugger/">http://downloads.zend.com/pdt/server-debugger/ </a>(<em>old location has libraries only up to PHP 5.2, but if that&#8217;s all we need then this will work fine.</em>)</li>
<li>After downloading Zend Debugger, the default instructions from README file did not work for me – the PHP refuses to load Zend Debugger before Zend Optimiser. So i need to configure Zend Debugger with Zend Extension Manager &amp; Zend Optimiser.</li>
<li>To make it work  i  extracted the contents of the ZendDebugger-5.2.x-cygwin_nt-i386.zip (debugger package file name which i have downloaded using Step 3 URL)  into C:\xampplite\php\zendOptimizer\lib, then i renamed the “ZendDebugger-5.2.x-cygwin_nt-i386″ folder to “Debugger”. Next i renamed the 4_3_x_comp, 5_2_x_comp, etc. folders to php-4.3.x, php-5.2.x etc. <em>(i looked into ..\Optimizer directory for reference</em>). Each …\lib\Debugger\php-X.X.x dir contains ZendDebugger.dll.</li>
<li>Using Text Editor edited my PHP.INI @ C:\xampplite\php\php.ini (<em>or C:\xampp\apache\bin\php.ini –I Used phpinfo() to confirm my path</em>)  and modified the values under the [Zend] section. Following are the list of changes i made</li>
<blockquote>
<p style="padding-left:90px;">zend_extension_ts = &#8220;C:\xampplite\php\zendOptimizer\lib\ZendExtensionManager.dll&#8221;<br />
zend_extension_manager.verbose=On<br />
zend_extension_manager.optimizer_ts = &#8220;C:\xampplite\php\zendOptimizer\lib\Optimizer&#8221;<br />
zend_optimizer.enable_loader = 0<br />
zend_optimizer.optimization_level=15<br />
;zend_optimizer.license_path =<br />
zend_extension_manager.debug_server_ts = &#8220;C:\xampplite\php\zendOptimizer\lib\Debugger&#8221;<br />
zend_debugger.expose_remotely=never<br />
zend_debugger.allow_hosts=127.0.0.1/32<br />
zend_debugger.allow_tunnel=127.0.0.1/32</p>
</blockquote>
<li>Next restarted Apache, opened http://localhost/xampp/phpinfo.php and verified whether  Zend Debugger is enabled.  Following are the changes i noticed in my phpinfo section<br />
<a href="http://santakrish.files.wordpress.com/2010/09/9-9-2010-7-30-20-pm.png"><img class="alignnone size-medium wp-image-22" title="9-9-2010 7-30-20 PM" src="http://santakrish.files.wordpress.com/2010/09/9-9-2010-7-30-20-pm.png?w=300&#038;h=115" alt="" width="300" height="115" /></a></li>
</ol>
<h2>Installing Eclipse with Zend Debugger plugin</h2>
<ol>
<li>Downloaded and installed PDT &#8211; Use the PDT provided by Zend (http://www.zend.com/community/pdt?ecl=EclipseZend)</li>
<li>In order to support Drupal Content Types, following are the changes i made to my Eclipse PDT
<ul>
<li> Under <em>Window -&gt; Preferences</em> menu:Expanded the left-hand menu to <em>General -&gt; Content Types</em>.  Under <em>Content types</em> on the right, click <em>Text -&gt; PHP Content Type</em>.   I added the <code>*.engine, *.theme, *.install, *.inc, *.module *.profile</code> and <code>*.test</code> file<br />
types so that these files will be recognized as PHP.</li>
<li>I also installed Drupal Plug in for Eclipse by using the following steps.  Go to Eclipse and choose the <em>Help</em> menu, then <em>Install New Software</em>. Click the <em>Add</em> button or link and add the following new software site to download the Drupal plugin:
<ul>
<li><code>Name: XTND.US<br />
Location: http://xtnd.us/downloads/eclipse</code></li>
</ul>
</li>
</ul>
</li>
<li>Then added my drupal folder as php project. Todo this i just created an emty php project and give the project workspace as c://xampplite/htdocs and added my existing drupal folder to this project as a general folder import in eclipse.</li>
<li>Then i made some changes to Web browser setting using the following Steps , Opened Window-&gt;Preferences-&gt;General-&gt;Web Browser and set my browser  as external browser and selected one of my browser types ( in my machie i had IE, Mozilla, Default browser) but i went with Mozilla .</li>
<li>Next step is to set Zend debugger as the Default PHP debugger for which i followed the steps -  Window-&gt;Preferences-&gt;PHP-&gt;Debug, and set the PHP Debugger option to Zend Debugger<br />
<a href="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-05-18-pm1.png"><img class="alignnone size-medium wp-image-32" title="9-10-2010 5-05-18 PM" src="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-05-18-pm1.png?w=300&#038;h=267" alt="" width="300" height="267" /></a></li>
<li> Once done, next step  is to start debugging for that i right clicked  Index.php and executed the following steps &#8212; choose Debug As -&gt; PHP Web Page Option -&gt;Automatically firefox opens and i can see my  project running.</li>
<li>Eclipse will also pop up a &#8220;Confirm perspective Switch&#8221; window &#8211;   Clicking [Yes] will open a whole new perspective window and you will see the code being halted at the first active line of code in my Drupal code base.<br />
<a href="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-38-23-pm.png"><img class="alignnone size-medium wp-image-35" title="9-10-2010 5-38-23 PM" src="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-38-23-pm.png?w=300&#038;h=180" alt="" width="300" height="180" /></a></li>
<li> I was able to Set break points wherever it is needed and used step into fucntion to see the code flow. I too was able to n set the break points in module files and themes page to debug</li>
<li>For debugging other pages i copied the url like ?debug_host=172.16.21.29%2C172.16.24.8%2C127.0.0.1&amp;start_debug=1&amp;debug_port=10000&amp;original_url=http%3A%2F%2Flocalhost%2Fgala-smf%2Fapplication%2Fsrc%2Findex.php&amp;send_sess_end=1&amp;debug_stop=1&amp;debug_start_session=1&amp;debug_no_cache=1284121076906&amp;debug_session_id=1002 <em>( eg my sample other page URL  &#8211; http://localhost/gala-smf/application/src/html/index.php?debug_host=172.16.21.29%2C172.16.24.8%2C127.0.0.1&amp;start_debug=1&amp;debug_port=10000&amp;original_url=http%3A%2F%2Flocalhost%2Fgala-smf%2Fapplication%2Fsrc%2Findex.php&amp;send_sess_end=1&amp;debug_stop=1&amp;debug_start_session=1&amp;debug_no_cache=1284121777640&amp;debug_session_id=1003)</em></li>
<li>Once the debugger is configured , don&#8217;t try to access your pages using http://localhost/&lt;application name&gt; or http://127.0.0.1/&lt;application name&gt;, it results in apache crashes, to fix this  try to access the application using the ip address or by using any virtal host URL configured for your application.</li>
</ol>
<h3>Happy debugging, avoid using echo &amp; exit statements <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </h3>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/santakrish.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/santakrish.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/santakrish.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=santakrish.wordpress.com&amp;blog=15711071&amp;post=1&amp;subd=santakrish&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://santakrish.wordpress.com/2010/09/07/eclipse-drupal-zend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55b58df860f755786ce4592e72457584?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santakrish</media:title>
		</media:content>

		<media:content url="http://santakrish.files.wordpress.com/2010/09/9-9-2010-7-30-20-pm.png?w=300" medium="image">
			<media:title type="html">9-9-2010 7-30-20 PM</media:title>
		</media:content>

		<media:content url="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-05-18-pm1.png?w=300" medium="image">
			<media:title type="html">9-10-2010 5-05-18 PM</media:title>
		</media:content>

		<media:content url="http://santakrish.files.wordpress.com/2010/09/9-10-2010-5-38-23-pm.png?w=300" medium="image">
			<media:title type="html">9-10-2010 5-38-23 PM</media:title>
		</media:content>
	</item>
	</channel>
</rss>
