Xdebug is full of awesome

published on January 30, 2012.
Heads-up! You're reading an old post and the information in it is quite probably outdated.

I’m currently trying to fix a Mockery bug and, while deep in the code, I came across a piece of code which gets eval’d. Mainly to understand better what’s going on, I wanted to step debug it. I first set a breakpoint before the eval call and then tried to step into the eval’d code, but that didn’t work out, Netbeans just moves along to the next line.

What did work, is setting a xdebug_break() call inside of the code that will be eval’d - and BAM! it works! Netbeans picks up the signal and everything works just as with regular code - you can view the values of the variables, step in, step out and step over code.

Xdebug is full of awesome.

Happy hackin’!

Tags: debugging, xdebug.
Categories: Development, Programming.

Thanks for reading! If you require help on a project of any kind, let's talk!

Robert Basic

Robert Basic

Software engineer, consultant, open source contributor.

Let's work together!

If you require outsourcing or consulting help on your projects, I'm available!

Robert Basic © 2008 — 2019
Get the feed