View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001921 | Xdebug | Step Debugging | public | 2020-12-24 20:50 | 2021-01-04 00:46 |
Reporter | ngocphamm | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.0.1 | ||||
Target Version | 3.0dev | Fixed in Version | 3.0.2 | ||
Summary | 0001921: Xdebug does not start step debugging if start_with_request=trigger | ||||
Description | I have looked through the documentation and want to only trigger Xdebug step debugging with environment variable, so I tried this [PHP.INI] And I have a ZSH function so I can call "phpdebug script.php" to trigger debugging function phpdebug() { php $1 unset XDEBUG_SESSION This doesn't seem to work. If I set "start_with_request=yes" then it will, but it always do step debugging, and that's not what I want. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Operating System | macOS Catalina 10.15.7 | ||||
PHP Version | 8.0.0-8.0.4 | ||||
|
I'm not sure if installing xdebug from that homebrew tap would make any differences, but I also failed to install xdebug with pecl. I used to be able to before version 3.0.0. |
|
SAme here, I tried the same set up and struggled on the same behavior : that's because the presence of XDEBUG_TRIGGER is checked in the $_ENV superglobal (through find_in_globals()), and that only includes env vars set from the command line if the 'variables_order' ini param contains 'E', which apparently is not the case by default All other settings mentioned in the docs as being read fron the env (XDEBUG_MODE, XDEBUG_CONFIG...) are checked using getenv(), which works whatever the value of the 'variables_order' param. So passing XDEBUG_MODE, XDEBUG_CONFIG through the CLI env always works, but not XDEBUG_TRIGGER, which is confusing and not very clear from the docs. |
|
FWIW, as a workaround for CLI I ended up doing : But I'd find it much cleaner to go with |
|
I found that the workaround yched provided works for the same purpose (thanks!), but I agreed that the trigger should have worked as documented. |
|
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-24 20:50 | ngocphamm | New Issue | |
2020-12-24 20:51 | ngocphamm | Note Added: 0005615 | |
2020-12-25 12:39 | yched | Note Added: 0005616 | |
2020-12-25 12:45 | yched | Note Added: 0005617 | |
2020-12-25 13:47 | ngocphamm | Note Added: 0005618 | |
2020-12-31 11:49 | derick | Target Version | => 3.0dev |
2021-01-04 00:45 | derick | Assigned To | => derick |
2021-01-04 00:45 | derick | Status | new => closed |
2021-01-04 00:45 | derick | Resolution | open => fixed |
2021-01-04 00:45 | derick | Fixed in Version | => 3.0.2 |
2021-01-04 00:45 | derick | Note Added: 0005632 | |
2021-01-04 00:46 | derick | Relationship added | has duplicate 0001923 |