I'm working on some code for a custom Drupal 7 module the problem is i'm dealing with many arrays and strings. I have tried to use print(), and print_r() to output values so i can see what i'm working with but nothing is printed to the screen. Is Drupal 7 preventing this from happening? How do other Drupal 7 module developers output values? for example in JavaScript i can use console.log() and for PHP i would normally use print(), print_r(), and echo. But looks like Drupal is not permitting this from working in my PHP code.
UPDATE:
In my module i have .inc file inside this file i have a method called list_builder($delta){} Inside this i have a switch() to handle different lists based on the $delta. This method is being executed on the cron_hook. It processes data from some outside sources and builds a json file. I'm at the point of building my json output but dealing with a lot of variables and need to be able to look at the variables at each spot in the process to know what data i'm dealing with while i build the output. I'm looking for a way to diagnostically test/display variables as i work on this module. I'm looking for a universal solution that works no mater what i'm doing.