Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
254
Reporter ?
Pysis
MacGDBp / 1.5
Status ?
Closed
Severity ?
Moderate
Duplicate Of ?
- none -
Fixed in Revision ?
Mstone ?
Summary ?
How can I debug code with a breakpoint with `php -r '...'`?
Report Time ?
October 29, 2017 06:25 PM
Assignment ?
Resolution ?
Invalid
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?


Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0

October 29, 2017 06:25 PM Pysis
Whether this is possible or not, it would be good to add it to the website/documentation.

~ php -d zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so" -r 'echo ini_get("zend_extension");'
Cannot load Xdebug - extension already loaded
~

~ php -d xdebug.remote_enable=1 -d xdebug.remote_host=localhost -d xdebug.remote_port=9000 -d xdebug.remote_autostart=1 -r 'xdebug_break();'
~

It does not activate in the attached debugger on 9000 like it does with phpunit:
php -d xdebug.remote_enable=1 -d xdebug.remote_host=localhost -d xdebug.remote_port=9000 -d xdebug.remote_autostart=1 ./vendor/phpunit/phpunit/phpunit --bootstrap file.php tests/fileTest.php

October 29, 2017 06:27 PM Pysis
Fyi, to add more keywords for searching, I want do debug code given on the command line (CLI), but it does not seem to trigger.

September 4, 2019 01:16 PM Robert
Sorry, I do not know, but this is not a support forum.

On September 4, 2019 01:16 PM, Robert changed: