Open johnbillion opened 5 years ago
I know we include phpdbg
right now, @rmccue would be good to document how to use phpdbg
. I don't think many of us in HM are anywhere near as familiar with it as XDebug.
@roborourke Indeed; the problem is broader, and phpdbg itself has poor documentation. I've been working on it at https://rmccue.github.io/phpdbg-docs/
So this comment from one of the phpdbg
maintainers is pretty revealing: https://www.reddit.com/r/PHP/comments/5zmis5/is_phpdbg_dead/dezvk43/
Key highlights:
When phpdbg became part of PHP, many people expressed interest in being able to use phpdbg from their IDE. What we should have said is "no, use xdebug": xdebug is mature software, full of features, with excellent remote capabilities.
phpdbg has some extremely powerful features that do not fit into DBGp (we later learned that DBGp could have been extended), and because of the architecture of the software is not really suitable for debugging your Apache or FPM process
As it's a command line debugger it doesn't really make sense for the majority of the work we do or that anyone working on Altis would do. XDebug is way more useful, has much better knowledge share at least internally, better documentation, is already widely used and much better integrated with other tools.
phpdbg
is not a replacement for XDebug so I think we should provide it in our dev environments, I'm pretty sure 9/10 times a dev is gonna have to install it anyway.
I'm OK with that, my reservations are two-fold though:
If we can disable the other stuff, then I'm OK with bundling it, as there are a decent amount of people who use it. I would still suggest that installing it globally is a better idea though, as a dev tool.
(Also, I actually don't necessarily think we should bundle phpdbg.)
We could document how to add it as a global extension then, and remove phpdbg
at the same time.
If you install XDebug globally, how do you specify the IDE config property?
I’m not sure you need to. Or at least I’ve never changed it from whatever default we put in that extension. Do you normally override that setting?
The Xdebug extension is handy for a few reasons. It makes debugging output prettier (for those who enjoy using
var_dump()
, it provides full stack traces for fatal errors, and it allows breakpoint debugging via your favourite client.It also works with PHP 7.3 now.
Chassis/Xdebug