Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78611 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38946 invoked from network); 4 Nov 2014 06:00:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 06:00:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 74.125.82.41 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 74.125.82.41 mail-wg0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:62984] helo=mail-wg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/81-24107-99B68545 for ; Tue, 04 Nov 2014 01:00:58 -0500 Received: by mail-wg0-f41.google.com with SMTP id k14so14157800wgh.0 for ; Mon, 03 Nov 2014 22:00:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=6T2aoKWJ0wbEYKfmlKsmmgHXPeJNzQyBghxk6DzhEG4=; b=jzYQFcdubIR/pZozrPnnJOmHp1IZUKVHG1WOMG8ab/7+CTiQ5irQfV9LyCzPOxVZ91 HlFsg5ZQhMmUHRXH/Kc5gvGqy/ty4Ot8OEnHYXlyzOIJ/2P0KLkfwZbzcVPoCuGrs3i/ D73z981hYduNukoyxNibscDQVVUoKCtK2Ycdy/rIE0Uh6ezp7wVZsf+3U3S0GAVuBfui 34fYrgUqCBYu5QniPLTd3ZGGKfIaE+clst7fVW9NGNX8FA+H3+s0Kk0BVIeEEu/wT5BB +jz55TocUNx7D+9jFDvUWEqGc8VVOgnXkFnu8eckYORS+rQA0nbqCJyEd9Gr+6rqgRe8 MG+Q== X-Gm-Message-State: ALoCoQkGH8b/xurzyphc89QTV690e+gwgq5bEi/MDlTGfIRNhfSR8E10xHpgcotrFaNDfYwbEv9j X-Received: by 10.180.211.2 with SMTP id my2mr21545252wic.13.1415080854502; Mon, 03 Nov 2014 22:00:54 -0800 (PST) Received: from [192.168.1.67] (host86-139-76-235.range86-139.btcentralplus.com. [86.139.76.235]) by mx.google.com with ESMTPSA id dr5sm11060508wib.4.2014.11.03.22.00.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 03 Nov 2014 22:00:53 -0800 (PST) Message-ID: <1415080851.2624.344.camel@localhost.localdomain> To: Derick Rethans Cc: PHP Developers Mailing List Date: Tue, 04 Nov 2014 06:00:51 +0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHPDBG scope From: pthreads@pthreads.org (Joe Watkins) On Mon, 2014-11-03 at 21:03 +0000, Derick Rethans wrote: > Hi, > > This is based on an email conversation between Joe Watkins and me. I > asked him > what the original scope of phpdbg was, and I've summarized his reply > here: > > - PHPDBG was originally envisioned as a "gdb" for the Zend VM, with gdb > like commands to debug, and step through code. > - Support for breaking on an opline, something that no userland PHP > users would need. > - Support for breaking on lines, was an additional step later. > - For PHP programmers, which spend most of their time at the console. > - Not "intended to cover PHP's primary domain of HTTP requests". > > Then later, they "documented a way that you could use it to emulate an > HTTP request, by setting those superglobals and executing your index.php > - your code doesn't know the difference between a real request, and a > cli-like script with the same super globals set." > > And Joe indicates, that with that addition, the "flood gates opened". He > also said that he "would still like to remain in that narrow scope, > phpdbg is still useful in it's current (pre xml stuff) form." and that > it was never meant to "usurp xdebug", as "that is not where we were > aiming, and it's an extremely unrealistic thing to even want." > > And I very much agree that the above bullet points, is what phpdbg's > scope should be. > > Joe, if I got this wrong, then please say so :-) > > cheers, > Derick > > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > Posted with an email client that doesn't mangle email: alpine > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Morning Internals, Thank you Derick. "Why should phpdbg scope be limited, and not extended?" It's not about limiting the scope of phpdbg, it's about defining it properly. The right tool for the job is what we are talking about. phpdbg will *never* be able to do all the things xdebug can do, and it would ruin it to try. In the same way, there are things phpdbg can do that would further complicate xdebug (or even be impossible), and we shouldn't try that either, obviously. "The original scope of a project and what it should be in the future are not always related" True, but in this case it does actually matter. You will never be able to load phpdbg in any SAPI and debug any web request in a robust way. It was never intended for that, it is limited, in that sense, because it's a SAPI. Being a SAPI allows us to do things you cannot do in an extension, such as overriding Zend's memory management routines. We have features based on these abilities. I very much agree that we should keep phpdbg within the scope it was designed for. I'm not saying we should not extend the features of phpdbg, but, we should do it knowing what it actually is, knowing that it is fundamentally different to xdebug. Cheers Joe