Can't fix CLI runSubAction does not inherit parent process arguments (ie php debugging arguments)

Xon

Well-known member
Affected version
2.0.1
If you run the CLI with various advanced debugger options (ie "-d xdebug.remote_autostart=On" or other options), various installer tasks throw away these options when they a new create a php process.

This makes running the installer in a debugger very challenging, when this can be easily done with the rest of the XenForo stack.
 
@Chris D and I have spent quite a while trying to get this working, but unfortunately, switches passed to the PHP executable are not available to the scripts that are executed, so it is impossible to recover your -d xebug... switch and apply it to child processes.

You'd actually have a much easier job just running it as a process in an IDE like PHPstorm, where you can have it pause on breakpoints etc.
 
Normally I do run XF2 with PHPStorm connected as a debugger, it is just when I need to run an existing CLI script to then call back to my debugger it becomes tricky without modifying the global /etc/php.d/ settings (or php-fpm thread pool settings).

Having some way to inject additional arguments would be helpful, as otherwise debugging the exec'ed process can get tricky tricky.
 
Top Bottom