Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a back button in the Eclipse PHP Xdebug debugging pointer?

Tags:

php

xdebug

I'm debugging PHP with Xdebug using Eclipse. All went OK except when I would like the debugging pointer to go back to the previous lines. Is this possible? I don't want to restart the debugging.

In details, supposing I'm on line 500 then I proceed to line 505, can the debugging pointer in Eclipse goes back to line 500 to check the state of my variables?

I'm still new to debugging with Eclipse so I appreciate any tips on how this will be done. Thank you.

like image 668
Emerson Maningo Avatar asked Mar 05 '26 21:03

Emerson Maningo


2 Answers

No, it isn't possible. Xdebug doesn't allow you to do it.

You will have to run the program again from the start to get back to the same point. (unless it's in a loop of course)

like image 168
Spudley Avatar answered Mar 08 '26 11:03

Spudley


This kind of feature is highly sophisticated and requires the debugger to store the application state at all times (starting from a breakpoint) in order to "go back in time" and re-run code.

I haven't seen this with xdebug or even PHP at all. Last time I worked with this feature was in the old C++ days with Visual Studio Debugger. Microsoft invented something they called "IntelliTrace" for this.

(see article about IntelliTrace here: http://msdn.microsoft.com/en-us/magazine/ee336126.aspx)

like image 33
Honk der Hase Avatar answered Mar 08 '26 09:03

Honk der Hase