Set up xdebug
Categories
(Conduit :: Phabricator, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: mhentges, Assigned: mhentges)
References
Details
(Keywords: conduit-triaged)
Attachments
(2 files, 2 obsolete files)
We should be able to use a debugger while working on Phabricator.
Steps:
- Document that your IDE/debugger should be configured to listen on
9000
, the XDebug default port - (dependent on 1606383) separate production and development Phabricator image build steps
- In the development Phabricator image, install PHP XDebug
- When
docker-compose
spools up, our containers run in a network like172.[same number for all containers].0.[unique number per container
. Importantly,172.[number].0.1
refers to the host. In entrypoint.sh, calculate the host's ip in this virtual network, and add the following options to PHP fordev_start
:
-d xdebug.remote_host = 172.[number].0.1
-d xdebug.remote_enable = 1
- Document installing the XDebug helper for Firefox and how to use it
- Test ^, I might've forgotten an XDebug feature
Assignee | ||
Comment 1•5 years ago
|
||
This is especially valuable to me for two reasons:
- I'm getting up-to-speed with Phabricator, and having the ability to step into data structures ergonomically is enormously helpful in spooling up
- Being able to step through logic to find out why a bug is happening (so you can, y'know, de-bug your software π) can make the process much faster
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Ugh, manually specifying path mappings has to be done too, this should be documented as part of the patch as well
Assignee | ||
Comment 3•5 years ago
|
||
Targets development phabricator image which includes xdebug support
Assignee | ||
Comment 4•5 years ago
|
||
Splits dockerfile into multi-stage-build so that we have a production and development target.
Installs xdebug in the development target.
Documents how to set up your IDE for xdebug
Depends on D57720
Assignee | ||
Comment 5•5 years ago
|
||
Splits dockerfile into multi-stage-build so that we have a production and development target.
Installs xdebug in the development target.
Documents how to set up your IDE for xdebug
Depends on D57720
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Don't forget this patch
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
•
|
||
Three things:
- Initial xdebug support only worked for debugging webserver pages, but not the daemon. I added support for that, but:
- The phabricator daemon runs a lot of processes. These would fill up all of PHPStorm's "max. simultaneous connections", making page loads hang. This is worked around by bumping the max connections (TODO: document and update my PR!) or by not running a debugger (so, non-debugger users won't be affected)
- I still need to test attaching a debugger and catching a "moz-phab submit" operation, which will be awesome when it works
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Splits dockerfile into multi-stage-build so that we have a production and development target.
Installs xdebug in the development target.
Documents how to set up your IDE for xdebug
Assignee | ||
Comment 9•5 years ago
|
||
This is ready for review now π
Assignee | ||
Updated•4 years ago
|
Description
•