Is there anyway, I can verify if a method is invoked from module? I am working onthisdate sample and would like to if onthisdate_block() is getting invoked or not. I am not sure on how to put print statements to write log. I am new to php as well and trying to learn.

Appreciate your time.
Chinni

Comments

newbuntu’s picture

I played with onthisdate() briefly before. Don't quite remember the details. Did you tinkle with permission stuff? I also used hard coded value to test it before I hooked the db content.

While the ultimate way to debug is to use eclipse and Xdebug, there you can step into the code. But it's hard for the beginner to setup. I managed to get it to work. I never touched the settings ever since. I know it will take me forever to figure it out again. So I can only point you to the general direction, I don't even remember the details on how I got it to work.

I played with a document "XDebug PHP IDE Guide" by Dave Kelsey version 1.07. I don't have the link anymore. Google around, if you still can't find it, I don't know a good way to upload it on this forum. It contains screen shots etc. and it's long.

good luck.

criznach’s picture

Sure, that's pretty easy. Add this code...

drupal_set_message("here!");