E
E
EvgMul2016-10-25 00:57:48
PHP
EvgMul, 2016-10-25 00:57:48

How to step through a loop in Xdebug?

Hello. I'm learning Xdebug. I set it up in PHPStorm, everything works fine, the only thing I can’t figure out is how, when stepping through debugging, fall into the loop and monitor data changes inside it.
For example:

$testVar = 404;
while ($testVar < 410)
        $testVar++;

I put a breakpoint on the variable initialization line, then I press F8, the debugger immediately jumps to the next line after the loop.
I understand that the question is stupid and the answer is simple, but it is still there.
Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
6
65536, 2016-10-25
@EvgMul

$testVar = 404;
while ($testVar < 410) {
    $testVar++;
}

looks like the storm is hinting at you about using PSR)

T
Tema, 2016-10-25
@Tem_ka

F7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question