View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000406 | Xdebug | Step Debugging | public | 2008-08-27 19:02 | 2020-03-12 17:36 |
Reporter | cheesegrits | Assigned To | derick | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 2.3.0 | ||||
Summary | 0000406: Need to see PHP defines/constants | ||||
Description | Need to be able to see values of PHP defines in debug. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 5.2.4 | ||||
|
I don't know what you mean here, can you clarify? |
|
I believe that the users wants to be able to see the values of any constants that are defined. For example, if I make the following define: define('MY_CONSTANT','xyz'); It would be good to be able to retrieve the value of MY_CONSTANT through Xdebug. As far as I know, this is not currently possible (i.e. not support by "context_get", "property_get", etc...). |
|
Yes, that's exactly what I meant. -- hugh |
|
I agree it would be great - is it possible with PHP though? |
|
It should be possible, but I don't know enough about PHP internals to see exactly how to do it. One problem is that the defined constants appear to live in a single If someone can tell me where PHP stores this set of names and values, it |
|
You mean like "get_defined_constants": |
|
Yes. What would the C code using the PHP API be to do that? |
|
Just to sketch out what I have in mind, all in #define DBGP_CONTEXT_LOCALS 0 DBGP_FUNC(context_names) static int attach_context_vars(...) { I've only gotten my toe wet with the PHP internals, but |
|
User defined constants, as defined with define() are now included in context 2 ("User defined constants"). |
|
Xdebug now supports debugging user-defined constants. The constants will appear in "context" 2 with context_get (http://xdebug/docs-dbgp.php#id52) and this is also reflected in the context_names (http://xdebug/docs-dbgp.php#context-names) command. It is also possible to call "property_get -c 2 -n ... to fetch the value. The returned property information will have the facet set to "constant". |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-08-27 19:02 | cheesegrits | New Issue | |
2009-03-28 20:29 | derick | Note Added: 0000941 | |
2009-03-28 20:29 | derick | Status | new => feedback |
2009-04-15 01:36 | toddw | Note Added: 0000951 | |
2009-04-16 20:49 | cheesegrits | Note Added: 0000952 | |
2009-04-18 15:59 | p2409 | Note Added: 0000954 | |
2009-06-02 01:50 | ericp | Note Added: 0000959 | |
2009-06-02 19:04 | toddw | Note Added: 0000960 | |
2009-06-02 19:10 | ericp | Note Added: 0000961 | |
2009-06-02 19:35 | ericp | Note Added: 0000962 | |
2014-01-10 16:32 | derick | Note Added: 0002666 | |
2014-01-10 16:32 | derick | Status | feedback => closed |
2014-01-10 16:32 | derick | Assigned To | => derick |
2014-01-10 16:32 | derick | Resolution | open => fixed |
2014-01-10 16:32 | derick | Fixed in Version | => 2.3dev |
2014-01-10 16:36 | derick | Note Added: 0002667 | |
2014-07-29 09:37 | derick | Summary | Need to see PHP defines => Need to see PHP defines/constants |
2015-02-22 14:30 | derick | Fixed in Version | 2.3dev => 2.3.0 |
2020-03-12 16:55 | derick | Severity | minor => feature |
2020-03-12 17:36 | derick | Category | Feature/Change request => Step Debugging |