LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-17-2011, 03:32 PM   #1
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Rep: Reputation: 50
How to set up Eclipse to build and debug PHP/PECL?


It's been a very long time since I did much C development and I'm trying to contribute to a PECL extension for PHP. PHP and the PECL extensions are written in C and I'd like to set up my dev environment so that I can use a nice IDE (like Eclipse) and debug my code, stepping through it within a nice GUI. I'm hoping to develop on a linux box (Ubuntu 10) rather than Windows.

The main issue I have is that I don't know how to configure Eclipse (with CDT) so that it runs the entire process: configure/make/make install and then allows me to step through my code within the Eclipse GUI IDE. I have managed to edit files and then build from the command line and then use GDB to step through the code, but that's *REALLY* tedious.

Also, the PHP source codebase is quite large and takes several minutes to build. I'm hoping I might be able to limit the build to just one particular extension rather than rebuilding the whole things.

Lastly, I'd like to avoid installing the new, possibly broken, code in order to run it. Unless I'm mistaken, the build process results in a binary being constructed in the source directory and I'd like to debug using that new binary before I bother to install it on my system.

Sorry if these questions seem really basic. Like I said, it's been awhile and I'm hoping to get back on the horse quickly.
 
Old 04-18-2011, 02:56 PM   #2
cjgermany
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
Plug-ins

I've seen that Eclipse has a lot of plug-ins that work with it.

Try some on this search:
http://marketplace.eclipse.org/searc...olr_search/PHP
 
Old 04-18-2011, 03:16 PM   #3
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Original Poster
Rep: Reputation: 50
This would not be for PHP development but rather for C/C++ development (PHP's source code is C). I've made some progress -- I installed Eclipse CDT and imported the PHP source. After resolving some dependencies, I am stepping thru the code via debugger. Still working out some kinks, however.
 
Old 04-19-2011, 11:06 AM   #4
cjgermany
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
I wasn't quite clear exactly as to what you wanted- c or PHP development. You can search for c development plugins there too. Glad you got it working...
 
Old 04-19-2011, 11:52 AM   #5
sneakyimp
Member
 
Registered: Dec 2004
Posts: 795

Original Poster
Rep: Reputation: 50
Thanks for your suggestion.
 
  


Reply

Tags
eclipse, ide, pecl, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Howto: build and install the intl PECL extension for PHP5 in Debian LXer Syndicated Linux News 0 07-25-2008 06:30 AM
LXer: Build Web Services with PHP in Eclipse LXer Syndicated Linux News 0 05-14-2008 03:00 AM
Compiling PECL ssh2 - debug 144419855310001 Programming 0 08-29-2007 11:14 AM
php pear/pecl zip extension slackamp Slackware 1 06-11-2007 09:55 PM
PHP and PECL ID3 Ed_Bastard Linux - Software 0 10-26-2005 05:01 PM


All times are GMT -5. The time now is 07:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration