Answer the question
In order to leave comments, you need to log in
Why doesn't xdebug show the contents of variables without code changes?
The problem is this, I installed xdebug (I use vagrant, it has ubuntu, php7.3, nginx), set up mapping in phpstorm, communication with the server. I added xdebug to FF. Everything seems to work, BUT! For some reason, the contents of the variables in the code only show if there have been changes. At the same time, the content of the session \ cookies \ constants is always shown. Example:
Here the breakpoint is on line 7:
Of course, I expected to see what was inside the x variable before this line. But xdebug showed nothing. Last time I showed it, but next time it will show only if there are changes in the code. If there are no changes, then it will not show anything.
And here is the second example, I added a new variable and xdebug worked as it should:
But once again I closed-opened the debug and set the breakpoint to the same new variable:
$x *= 8;
Nothing came out! And it's stressful. And with code change somehow too through time. It is necessary not only to change the code, but to add at least 2 lines, and preferably 3-4. And then if you add one - it is unlikely that something will work. What can be wrong?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question