I'm trying to create a custom module that builds on top of imagecache and imagecache_actions to dynamically add an overlay to image thumbnails based on fields of the node its attached to.

I used hook_image_default_styles and hook_image_effect_info with a callback to my custom effect function. I have it working under most circumstances, but I have a bug thats causing it to fail under some specific circumstances.

The problem I'm having is that there is no way to debug it. Normally for debugging, I run eclipse with zend debugger to set breakpoints and step through lines of code.

I've set breakpoints for the above functions. Cleared the existing files from the style directory, and loaded the page in the debug mode. All my other breakpoints will get hit, but for some reason its able to generate the image without hitting those breakpoints. I know its being called because (1) the image with overlay is being generated properly, and (2) every once in a while it was hitting the breakpoints - but not consistently, and now, not at all.

Does anyone who is familiar with imagecache know how this might be happening? Maybe it is somehow generating the images in a different php request than the standard page load?

Does anyone who uses a debugger know why this might occur, or has anyone seen this behavior before?

1 Answer 1


It seems you are connected to page rendering process. Images are created with separate php calls, one for each image. If you want to connect to image generation call, disable retrieving images in your browser, load HTML, get image url with safety token and hit it directly, debugging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.