Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm take a step back in debugger

This question has been asked before for other IDE's, but what about for PHPStorm? Is there a way to take a step back while debugging?

Specifically after an exception is thrown, I'd like to easily take a step back. Or at least be able to see the call stack so I can quickly see where I need to set the breakpoint, because currently I just have to run again from the beginning and try to stop just before exception.

like image 960
Andrew Avatar asked Jul 08 '16 18:07

Andrew


People also ask

How do you go back a step in debugger?

Using the new Step Backward and Forward buttons So, if you've just taken a step in live debugging (F10 or F11), you can use the Step Backward button to quickly navigate to the previous step. This will automatically put Visual Studio in Historical debugging mode, at the line of code you've stepped back to.

Can we go back while debugging?

Going to a previously step is not possible in debugging... only option have a new break-point at that point and re-start debugging...

How do I go back to previous step while debugging in IntelliJ?

From the main menu, select Run | Debugging Actions | Smart Step Into or press Shift+F7 . Click the method. You can also select it using the arrow keys or tabs and press Enter / F7 .

What does step over do in debugging?

If the current line contains a function call, Step Over runs the code and then suspends execution at the first line of code after the called function returns. Step Out continues running code and suspends execution when the current function returns. The debugger skips through the current function.


1 Answers

Yes you can take a step back, sort of. The Frames window in the Debugger tab shows the execution path that was taken to get to this point. By default the debugger simply has the current frame selected.

You can easily click any of the frames, or use your arrow key to move up and down to view the state of variables and even the location in the code at that point.

like image 94
Andrew Avatar answered Oct 16 '22 09:10

Andrew