Re: debugging PECL extension with eclipse or other IDE
| From: | j adams | Date: | Mon, 18 Apr 2011 17:55:10 +0000 |
| Subject: | Re: debugging PECL extension with eclipse or other IDE | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8116@lists.php.net to get a copy of this message | ||
Johannes, I apologize for bringing my noob problems into IRC yesterday
and I thank you for your advice. It's all been very helpful and I've
been working to get my dev environment set up with a proper IDE rather
than nano/gdb.
I have managed to import the entire PHP code base into an Eclipse CDT
project on my Ubuntu machine and I am able to debug the PHP source,
stepping through each line of code. Initially Eclipse was unable to
perform the Make step but I ran the configure/make steps manually via
cli in my source folder until I had all the necessary dependencies
worked out and now Eclipse is able to build the source code just fine.
I'm almost there.
I cannot, however, build PHP with --enable-amf. Here's my configure command:
./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --enable-exif
--enable-ftp --enable-mbstring --with-mysqli --with-pdo-mysql
--enable-soap --enable-sockets --enable-wddx --with-xmlrpc
--enable-zip --with-openssl --with-curl --with-gd --with-mcrypt
--with-jpeg-dir=/usr/lib --enable-pcntl --prefix=/usr --enable-debug
--enable-amf
The result says --enable-amf is not a recognized option.
Notice: Following unknown configure options were used:
--enable-amf
Building the amf extension all by itself in its own dir manually via
cli works just fine, creating amf.so. The main problem I face is how
to get this PHP project to either build with amf built-in or to load
amf.so dynamically by parsing a PHP.ini file. I think the ideal
situation would be one wherein I can build *just* my extension from
within the GUI and then call PHP with a parameter specifying a php.ini
which causes it to load my amf.so file as a dynamic extension.
Any hints would be much appreciated. I do firmly believe I can
contribute something of value to AMFEXT. I've created an AMF3
serializer class in PHP before and have managed to get a scaled-down
version of amfext running which properly serializes NULL, TRUE, FALSE,
integers, floats, etc. in AMF3 format. It's just very tedious and
confusing without proper contextual help from a decent IDE.
2011/4/18 Johannes Schlüter <johannes@schlueters.de>:
> On Sun, 2011-04-17 at 10:11 +0200, Pierre Joye wrote:
>> hi,
>>
>> I don't think it is possible unless you can attach bins at runtime to
>> these debuggers.
>>
>> You should use GDB and one of its graphical frontends if a console
>> tool is not your cup of team.
>
> Eclipse CDT, NetBeans, kdevelop, ... and whatever you find are frontends
> to gdb. They all allow attaching a debugger to a running process as well
> as starting a program under the debugger.
>
> Often you can't easily type in custom gdb commands though. So you can
> make use of the .gdbinit macros provided, which can be a down side ...
>
> But that are mostly questions fro the different IDE vendors and
> independent from PHP. I think it is always good to first get the
> understanding of the tools and environments (therefore use it at command
> line) and then use a funky shiny GUI for things where it brings benefit
> (sometimes GUIs have nice ways to show data structures etc. which can
> become messy on command line) while knowing what's actually going on.
>
> johannes
>
>
>