Skip to main content

Posts

Quick evaluation of complex properties in Xdebug within Vim

For those of us who still use Vim for PHP development, getting Xdebug to work nicely with complex properties is a pain. Most of the time we end up evaluating print_r to get any sort of complex structure or deeply nested value. Not any more! Use this remapping: nnoremap ,p :python debugger_watch_input("property_get")<cr>A This is similar to ,e for quick evaluation, but lets you quickly get any given property. Press ,p and type the property you want or, if you prefer, use yank and ^R to copy/paste the property into the debugger window. It works for objects and array subscripts, so you can type complicated things like: /*}}}1*/ => property_get: $this->someArray['mySubscript'] and get the value of the named property.

Bickerton Hill

Bradfield in the cold

Christmas Comes To Sheffield

Dickensian Carollers Merry Go Round What a jolly horse Orchard Square This just made me laugh

Autumn Colours

The last of the autumn colours are shining brightly in the face of the on-coming winter. There was snow on the ground, but the light made the reds and oranges of autumn glow.

Winter Gardens

Winter Gardens , a photo by craigand on Flickr.

Crunch crunch crunch

Crunch crunch crunch , a photo by craigand on Flickr. Autumn is pretty much over, and all that's left is crunchy, leafy detritus.