{"id":627,"date":"2010-06-17T12:48:33","date_gmt":"2010-06-17T00:48:33","guid":{"rendered":"http:\/\/p-s.co.nz\/wordpress\/?p=627"},"modified":"2015-03-20T21:37:39","modified_gmt":"2015-03-20T09:37:39","slug":"xdebug-restored-on-lucid-for-netbeans","status":"publish","type":"post","link":"http:\/\/p-s.co.nz\/wordpress\/xdebug-restored-on-lucid-for-netbeans\/","title":{"rendered":"Xdebug restored on Lucid for Netbeans"},"content":{"rendered":"<p>[Update for Ubuntu 14.10 and Netbeans 7.4<\/p>\n<p>php.ini was in \/etc\/php5\/mods-available\/<\/p>\n<p>Needed the following:<\/p>\n<p><code>zend_extension = \"\/usr\/lib\/php5\/20121212+lfs\/xdebug.so\"<br \/>\nxdebug.remote_autostart=on<br \/>\nxdebug.remote_enable=on<br \/>\nxdebug.remote_enable=1<br \/>\nxdebug.remote_handler=\"dbgp\"<br \/>\nxdebug.remote_host=localhost<br \/>\nxdebug.remote_port=9000<br \/>\nxdebug.remote_mode=req<br \/>\nxdebug.idekey=\"netbeans-xdebug\"<br \/>\n<\/code><br \/>\n]<\/p>\n<p>When I upgraded from Netbeans 6.7 to 6.8 I lost the ability to debug line by line.  Later, I upgraded to 6.9 in the hope that this would fix it.  It didn&#8217;t but the Netbeans error message for xdebug gave me a better steer towards useful resources.  My system is Ubuntu Lucid (10.04) so I looked at <a href=\"http:\/\/wiki.netbeans.org\/HowToConfigureXDebug#How_to_on_Linux\">http:\/\/wiki.netbeans.org\/HowToConfigureXDebug#How_to_on_Linux<\/a>.  The answer for me was to edit a line in an xdebug file (I had previously added recommended lines * to php.ini to no avail &#8211; at least, not in isolation).<\/p>\n<p><code>cd \/etc\/php5\/conf.d<\/code><\/p>\n<p><code>sudo gedit xdebug.ini<\/code><\/p>\n<p>The first line of xdebug.ini was _almost_ correct \ud83d\ude09<\/p>\n<p>Because I was using PHP 5.3 the key was zend_extension rather than zend_extension_ts.  That part was right.  But the path was not quite correct.  Instead of:<\/p>\n<p><code><br \/>\nzend_extension=\/usr\/lib\/php5\/2006 ... +lfs\/xdebug.so<\/code><\/p>\n<p>it needed to be (in my case):<\/p>\n<p><code>zend_extension=\/usr\/lib\/php5\/20090626+lfs\/xdebug.so<\/code><\/p>\n<p>[Update &#8211; now \/usr\/lib\/php5\/20121212+lfs\/xdebug.so]<\/p>\n<p>Make sure the path actually exists and hasn&#8217;t become orphaned during an upgrade.<\/p>\n<p>I then stopped and started apache and restarted Netbeans to be safe.<\/p>\n<p><code>sudo \/etc\/init.d\/apache2 stop<\/code><\/p>\n<p><code>sudo \/etc\/init.d\/apache2 start<\/code><\/p>\n<p>&#8212;&#8211;<\/p>\n<p>* Here are the lines you will probably already have added:<\/p>\n<p><code>xdebug.remote_enable=1<br \/>\nxdebug.remote_handler=dbgp<br \/>\nxdebug.remote_mode=req<br \/>\nxdebug.remote_host=127.0.0.1<br \/>\nxdebug.remote_port=9000<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Update for Ubuntu 14.10 and Netbeans 7.4 php.ini was in \/etc\/php5\/mods-available\/ Needed the following: zend_extension = &#8220;\/usr\/lib\/php5\/20121212+lfs\/xdebug.so&#8221; xdebug.remote_autostart=on xdebug.remote_enable=on xdebug.remote_enable=1 xdebug.remote_handler=&#8221;dbgp&#8221; xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.idekey=&#8221;netbeans-xdebug&#8221; ] When I upgraded from Netbeans 6.7 to 6.8 I lost the ability to debug &hellip; <a href=\"http:\/\/p-s.co.nz\/wordpress\/xdebug-restored-on-lucid-for-netbeans\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,2],"tags":[],"class_list":["post-627","post","type-post","status-publish","format-standard","hentry","category-ubuntu","category-web-development"],"_links":{"self":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/627"}],"collection":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":5,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/627\/revisions"}],"predecessor-version":[{"id":1274,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/627\/revisions\/1274"}],"wp:attachment":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/categories?post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/tags?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}