Morning Internalz,
https://wiki.php.net/rfc/phpdbg
As requested, an RFC for the discussion of including phpdbg in the core
distribution.
I have kept it brief, I hope that's not a problem ...
Cheers
Joe
Morning Internalz,
https://wiki.php.net/rfc/phpdbg As requested, an RFC for the discussion of including phpdbg in the
core distribution.
I have kept it brief, I hope that's not a problem ...
Cheers
Joe
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?
Thanks,
Nikita
Morning Internalz,
https://wiki.php.net/rfc/phpdbg As requested, an RFC for the discussion of including phpdbg in the
core distribution.
I have kept it brief, I hope that's not a problem ...
Cheers
JoeI'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?Thanks,
Nikita
Morning,
This is not an extension, it is a SAPI module. The build system does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).
We originally requested that those API functions just be exported, and
they have been, so it can be deployed everywhere we wanted it to be
deployed ... but the response to that request was, that it would be nice
to have it in the core, so an RFC exists.
Cheers
Joe
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 system does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).
That still does not answer the question, though?!
--
Regards,
Mike
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 system
does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).That still does not answer the question, though?!
My question is very similar. Why not just bundle xdebug?
My question is very similar. Why not just bundle xdebug?
Did you ask if Derick wants it bundled?
--
Wbr,
Antony Dovgal
http://pinba.org - realtime profiling for PHP
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 system does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).That still does not answer the question, though?!
Yes, it does.
xdebug has a reasonable route to deployment already, it, and none of
it's users, benefit at all from xdebug being bundled.
This is not the same, it can be deployed outside of the source tree but
it's much harder, for most people, and for some impossible.
I was happy writing code, getting a few functions exported and deploying
to those people with the ability to build ...
I don't much care for anything but writing the code, and will go back to
that now ...
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 system
does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).That still does not answer the question, though?!
Yes, it does.
xdebug has a reasonable route to deployment already, it, and none of it's
users, benefit at all from xdebug being bundled.This is not the same, it can be deployed outside of the source tree but it's
much harder, for most people, and for some impossible.I was happy writing code, getting a few functions exported and deploying to
those people with the ability to build ...I don't much care for anything but writing the code, and will go back to
that now ...
Sorry, I actually only meant the first question: what's the difference
to xdebug?
I don't care yet about bundling, I don't event know what it is.
--
Regards,
Mike
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 system
does
not support external SAPI modules, the implementation requires Zend API
which is not exported (or wasn't, has since been patched).That still does not answer the question, though?!
Yes, it does.
xdebug has a reasonable route to deployment already, it, and none of it's
users, benefit at all from xdebug being bundled.This is not the same, it can be deployed outside of the source tree but it's
much harder, for most people, and for some impossible.I was happy writing code, getting a few functions exported and deploying to
those people with the ability to build ...I don't much care for anything but writing the code, and will go back to
that now ...Sorry, I actually only meant the first question: what's the difference
to xdebug?
I don't care yet about bundling, I don't event know what it is.
Mabye read http://phpdbg.com/docs/getting-started ? :)
As Joe already said, it is a SAPI, it has a debugging console, etc. It
is something amazingly handy.
Cheers,
Pierre
@pierrejoye | http://www.libgd.org
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 system does
not support external SAPI modules, the implementation requires Zend API
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
what he says, plus following the links to his write up on
http://phpdbg.com, is because phpdbg is a SAPI -- as far as I can see
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
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
smart tracebacks on errors. Also xdebug being an extension, you have
to be careful about load order when debugging other extensions. I
usually give up using xdebug and add (temporary) diagnostics to the PHP
source code.
As to Nikita's second Q: why should we bundle phpdbg instead of xdebug?
I think that an average PHP developer would find a CLI debug interface
that could be enabled through a command line switch a valuable addition
to the PHP development toolset. This utility argument was valid for
the -S option and the CLI webserver mode, so why not apply this same
argument here?
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
system does
not support external SAPI modules, the implementation requires Zend API
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
what he says, plus following the links to his write up on
http://phpdbg.com, is because phpdbg is a SAPI -- as far as I can see
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
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
smart tracebacks on errors. Also xdebug being an extension, you have
to be careful about load order when debugging other extensions. I
usually give up using xdebug and add (temporary) diagnostics to the
PHP source code.As to Nikita's second Q: why should we bundle phpdbg instead of
xdebug? I think that an average PHP developer would find a CLI debug
interface that could be enabled through a command line switch a
valuable addition to the PHP development toolset. This utility
argument was valid for the -S option and the CLI webserver mode, so
why not apply this same argument here?
I agree. phpdbg is very useful and different of xdebug by design and
features (SAPI, break-point, code introspection, userland API —can be
extended, wrapped, embedded…—). phpdbg has a CLI interface, but a
client/server model would be possible (and appreciated ;-)).
Consequently, a lot of software quality tools can emerge. This is not
possible with xdebug (without denigrating xdebug, this is just a
different tool). Having phpdbg bundled into PHP's core would be a good
idea from my point of view :-).
And please, with all my respect and without considering xdebug here,
stop using the “de-facto [standard]” expression. A tool is not good
because it is the only one to be in the place :-).
Regards.
--
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/
And please, with all my respect and without considering xdebug here,
stop using the “de-facto [standard]” expression. A tool is not good
because it is the only one to be in the place :-).
Nothing wrong with saying it's the de facto standard. It is the de facto
standard, though that doesn't make it good. Maybe that's what you meant.
Anyhow, I'd love for phpdbg to be included in PHP. Along with the CLI
server, it'd make PHP a lot more developer-friendly :)
--
Andrea Faulds
http://ajf.me/
It definitely seems the PHPDBG site and RFC both need work to explain
the purpose of this tool to a larger audience than the select few who
are currently excited about it, and I have offered to help get that
sorted out over the next few days. (Thanks for reaching out Joe).
The first issue seems to be "Why not just use XDebug". Sure, these are
both for debugging but XDebug works in a very different way.
For starters xdebug is meant to "latch on" to the existing engine and
provide debugging information and breakpoints for analysis. It also
provides remote config tools for sending those breakpoint responses to
another server so you can have a nice shiny Mac GUI working with a
remote SSH server. That is all lovely, but not what this tool is
trying to do - which is provide a new SAPI to run your code through
for debugging. From the ground up it is built and designed to do this,
instead of hooking into other bits of another engine.
XDebug allows you to run your code through Apache/Nginx and get this
data back, PHPDBG asks you to run your code through a different SAPI
which can get you the same data but in a much more efficient and
internally less complicated way.
So which should people use? Probably both.
Should they both exist? Certainly.
Which should be merged into the core? The one designed as a SAPI and
not as a module.
Not 100% sure what you'd use PHPDBG for? Even if you do not use it
yourself it could be used by frameworks like Laravel/Symfony to create
awesome console servers, REPLs, etc that are considerably more
powerful than the tools currently available due to limitations in the
existing SAPs. If you try creating a REPL in pure PHP right now you're
going to cry, but PHPDBG would make that easier. All in all, having
this SAPI distributed to all PHP developers wether they like it or not
(or wether they know what it is or not) is hugely beneficial - and has
no BC issues whatsoever.
Also by keeping XDebug as a module which has to be intentionally
installed by people that want it, there is the hopeful chance that
people will continue to avoid accidentally installing it into
production - which is bad for a bevy of reasons.
http://nikic.github.io/2012/01/19/Careful-XDebug-can-skew-your-performance-numbers.html
http://stackoverflow.com/questions/3522182/will-enabling-xdebug-on-a-production-server-make-php-slower
And please, with all my respect and without considering xdebug here,
stop using the “de-facto [standard]” expression. A tool is not good
because it is the only one to be in the place :-).Nothing wrong with saying it's the de facto standard. It is the de facto
standard, though that doesn't make it good. Maybe that's what you meant.Anyhow, I'd love for phpdbg to be included in PHP. Along with the CLI
server, it'd make PHP a lot more developer-friendly :)--
Andrea Faulds
http://ajf.me/
Morning,
This is not an extension, it is a SAPI module. The build system
does not support external SAPI modules, the implementation requires Zend
API which is not exported (or wasn't, has since been patched).
Independently from phpdbg, is there any particular (technical) reason that
prevents (zend?) extensions from registering SAPIs? Could we add something
for that to work?
Nikita
Morning,
This is not an extension, it is a SAPI module. The build system
does not support external SAPI modules, the implementation requires Zend
API which is not exported (or wasn't, has since been patched).Independently from phpdbg, is there any particular (technical) reason that
prevents (zend?) extensions from registering SAPIs? Could we add something
for that to work?Nikita
(Sorry niki, you will get this twice ...)
My head gets stuck in a loop when trying to think about it ... for a
zend extension or, certainly, an extension, to be able to do anything at
all, zend has to be initialized, it probably can work in some cases, but
if the purpose of the sapi module is to direct how zend behaves then it
won't work, I don't think ...
Building against 5.6+ is not a problem anyway, we could maybe even patch
embed and build against that for phpdbg in particular, but the problem
isn't so much how difficult it is to write a makefile but how difficult
it is to deploy any SAPI module apart from the sources. Nobody using
windows does their own builds, for a start, although you can distribute
binaries if you are a master of VC, which I'm not. Even on unix nobody
builds from source, nobody builds the embed library, it's not enough to
have a working build process because that doesn't get you into the
repositories for the major distributions.
I certainly would like to see improvements made such that in the future
it is easier to deploy SAPI modules, it's not useful for phpdbg, but
would be a very welcome change, for me ...
Cheers
Joe
Independently from phpdbg, is there any particular (technical) reason that
prevents (zend?) extensions from registering SAPIs? Could we add something
for that to work?
Nikita, if you think about it the SAPI contains main() -- or the
respective shared library master entry point, and acts as the calling /
callback framework for the Zend environment. To make the SAPI an
extension would require inverting this PHP Zend architecture so that
there is some sort of general minimal wrapper which can then layer in an
additional personality by loading in some shared library from some
context. However, this wouldn't be a Zend or PHP extension as we know
it. This would involve a lot of work.
Thinking off the top of my head, what we could possibly do would be to
hook some of the standard entries in the CLI SAPI so that a SAPI-aware
extension could insert itself into this chain and modify the behaviour
of the standard CLI (or potentially other) SAPIs. This approach could
allow phpdbg to be a Zend Extension "skin" on the standard CLI.
Regards Terry
Independently from phpdbg, is there any particular (technical) reason that
prevents (zend?) extensions from registering SAPIs? Could we add something
for that to work?
yes - simplyas the SAPI is the thing starting PHP. Etensions are loaded
after ... what is possible is using embed SAPI to get a PHP lib and link
that to some SAPI.
phpsrc$ ./configure --enable-embed && make && make install
sapi$ gcc -osuper_php -lphp some_sapi.c
The extra stuff in embed can easily be ignored, the generated libphp.so
(or liphp.a when using --enable-embed=static) offers all symbols needed.
johannes
Morning Internalz,
https://wiki.php.net/rfc/phpdbg As requested, an RFC for the discussion of including phpdbg in the
core distribution.
I have kept it brief, I hope that's not a problem ...
Cheers
Joe
Hi internalz,
Are there questions remaining, or can we go ahead and vote ??
Cheers
Joe
Morning Internalz,
https://wiki.php.net/rfc/phpdbg As requested, an RFC for the discussion of including phpdbg in the
core distribution.
I have kept it brief, I hope that's not a problem ...
Cheers
JoeHi internalz,
Are there questions remaining, or can we go ahead and vote ??
Cheers
Joe
Morning Internalz,
Voting closed this morning. phpdbg is coming to 5.6 :)
Cheers
Joe
Morning Internalz,
Voting closed this morning. phpdbg is coming to 5.6 :)
Congrats \o/.
--
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/