L
L
lolrofl012020-02-21 23:15:49
xdebug
lolrofl01, 2020-02-21 23:15:49

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;

5e5036f0ecffa992314516.png



5e503a11ef45c119633923.png


5e503a43cc8ae165389367.png

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

1 answer(s)
L
lolrofl01, 2020-02-22
@lolrofl01

It was necessary to reload vagrant - vagrant reload (or use vagrant provision) and it all worked!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question