View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001898 | Xdebug | Uncategorized | public | 2020-11-27 07:18 | 2021-10-04 09:32 |
Reporter | sebastian | Assigned To | derick | ||
Priority | high | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 3.0.0RC1 | ||||
Target Version | 3.1dev | Fixed in Version | 3.1.0 | ||
Summary | 0001898: API for querying the currently active mode(s) | ||||
Description | I would really like for Xdebug to provide a function that returns information about which mode(s) is/are currently active. The motivation for this can be found here https://github.com/sebastianbergmann/php-code-coverage/issues/834#issuecomment-734655455 | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.4.0-7.4.4 | ||||
|
Sebastian's reasoning:
I understand that Xdebug looks at the XDEBUG_MODE environment variable and changes its mode based on that. As far as I can see, though, Xdebug does not provide an API for querying its mode apart from using ini_get('xdebug.mode') (or using xdebug_info(), capturing its output through output buffering, and then parsing the generated HTML). For a short term solution, this library can fall back to looking for/at the XDEBUG_MODE environment variable. If it is set, its string contents will be treated like the string contents of ini_get('xdebug.mode') is right now:
The message of Xdebug3NotEnabledException, of course, needs to be adapted. In the long run, though, I would really like for Xdebug to provide a function that returns information about which mode(s) is/are currently active. |
|
I have settled on the following API:
Does that work for you? |
|
Thank you for this birthday present ;) Yes, that works for me. |
|
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-27 07:18 | sebastian | New Issue | |
2020-11-27 12:00 | derick | Status | new => confirmed |
2020-11-27 12:00 | derick | Target Version | => 3.0dev |
2020-11-27 12:00 | derick | Note Added: 0005549 | |
2020-12-04 12:50 | derick | Target Version | 3.0dev => 3.1dev |
2021-03-21 20:44 | derick | Relationship added | has duplicate 0001959 |
2021-04-21 16:41 | derick | Assigned To | => derick |
2021-04-21 16:41 | derick | Status | confirmed => feedback |
2021-04-21 16:41 | derick | Note Added: 0005857 | |
2021-04-22 05:04 | sebastian | Note Added: 0005858 | |
2021-04-22 05:04 | sebastian | Status | feedback => assigned |
2021-04-23 10:51 | derick | Status | assigned => closed |
2021-04-23 10:51 | derick | Resolution | open => fixed |
2021-04-23 10:51 | derick | Fixed in Version | => 3.1dev |
2021-04-23 10:51 | derick | Note Added: 0005859 | |
2021-09-05 16:15 | derick | Fixed in Version | 3.1dev => 3.1.0beta1 |
2021-10-04 09:32 | derick | Fixed in Version | 3.1.0beta1 => 3.1.0 |