Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10138 invoked from network); 22 Nov 2013 08:44:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2013 08:44:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.10.56 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.10.56 host1.ip6-networks.net Received: from [95.130.10.56] ([95.130.10.56:53484] helo=host1.ip6-networks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/52-28674-F791F825 for ; Fri, 22 Nov 2013 03:44:48 -0500 Received: from Hwhost2.local (184-175.106-92.cust.bluewin.ch [92.106.175.184]) by host1.ip6-networks.net (Postfix) with ESMTPSA id 1A7A460821 for ; Fri, 22 Nov 2013 09:44:44 +0100 (CET) Message-ID: <528F197B.7040802@hoa-project.net> Date: Fri, 22 Nov 2013 09:44:43 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Thunderbird/27.0a2 MIME-Version: 1.0 To: internals@lists.php.net References: <4E.7B.51208.63ACD825@pb1.pair.com> <528E1AF6.9050201@php.net> <528E4093.5000503@gmail.com> In-Reply-To: <528E4093.5000503@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: phpdbg From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 21/11/2013 18:19, Terry Ellison wrote: > On 21/11/13 14:43, Michael Wallner wrote: >> On 21 November 2013 15:38, Joe Watkins wrote: >>> On 11/21/2013 02:20 PM, Nikita Popov wrote: >>>> I'm probably missing some context here, maybe you could explain how = >>>> phpdbg >>>> differs from something like xdebug? I mean, xdebug seems to be the >>>> de-facto >>>> debugging extension for PHP and has been for a long time, but we're = >>>> not >>>> bundling it. Why should we bundle phpdbg instead? >>> This is not an extension, it is a SAPI module. The build=20 >>> system does >>> not support external SAPI modules, the implementation requires Zend A= PI >>> which is not exported (or wasn't, has since been patched). >> That still does not answer the question, though?! > Nikita asked *two* questions. Joe answered the first. My reading of=20 > what he says, plus following the links to his write up on=20 > http://phpdbg.com, is because phpdbg is a SAPI -- as far as I can see=20 > esentially a debug variant of the CLI SAPI -- you can use it very much = > the same way that you can debug perl scripts with the "perl -d" switch.= > > This is functionality that I for one REALLY miss with PHP. Maybe its=20 > just me, but I've tried using xdebug without modifying the source, and = > I find it very difficult to configure for anything other than getting=20 > smart tracebacks on errors. Also xdebug being an extension, you have = > to be careful about load order when debugging other extensions. I=20 > usually give up using xdebug and add (temporary) diagnostics to the=20 > PHP source code. > > As to Nikita's second Q: why should we bundle phpdbg instead of=20 > xdebug? I think that an average PHP developer would find a CLI debug=20 > interface that could be enabled through a command line switch a=20 > valuable addition to the PHP development toolset. This utility=20 > argument was valid for the -S option and the CLI webserver mode, so=20 > why not apply this same argument here? I agree. phpdbg is very useful and different of xdebug *by design* and=20 *features* (SAPI, break-point, code introspection, userland API =E2=80=94= can be=20 extended, wrapped, embedded=E2=80=A6=E2=80=94). phpdbg has a CLI interfac= e, but a=20 client/server model would be possible (and appreciated ;-)).=20 Consequently, a lot of software quality tools can emerge. This is not=20 possible with xdebug (without denigrating xdebug, this is just a=20 different tool). Having phpdbg bundled into PHP's core would be a good=20 idea from my point of view :-). And please, with all my respect and without considering xdebug here,=20 stop using the =E2=80=9Cde-facto [standard]=E2=80=9D expression. A tool i= s not good=20 because it is the only one to be in the place :-). Regards. --=20 Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/