Constants shown in xdebug

2019-08-01 22:02发布

问题:

I'm using phpstorm xdebug and vagrant for debugging.

I've used xdebug before and i know that it never showed constants. Now however it shows all defined constants in the variables window which is pretty annoying because there are a lot of them and it hides the true variables.

Any possible idea why this is happening?

phpstorm 7.1.3

xdebug v2.3.0dev

php 5.3.10

回答1:

That's a new feature in 2.3: http://bugs.xdebug.org/view.php?id=406. Most IDEs will however have different windows/tabs for showing the constants as they are in their own "context" as you can see in the patch at https://github.com/xdebug/xdebug/commit/6ff33fcd4d452a06d4a80b995a5630abd9c11158

In any case, if you don't like the view, please contact PHPStorm's support - they might be able to improve on this.