Me and a colleague had a D7 problem to handle, $_SESSION were being lost for anonymous users. Because this is all happening on a staging server in a corporate environnment, devel module has been ripped out in preparation for the push to production. My colleague starts inserting
var_dumps() in a forms validate function, but the results don't show to screen.
He figures the validation is not being called, but I tell him about how Drupal suppresses output during rendering, I have experienced this many times. Adding a
die in the validate function confirmed that the function was in fact being executed, except the question remains -> why / how is output suppressed when echoing / var_dumping in functions?
Debugging with var_dump is probably not the most recommended or effective method, I just want to know what it is that prevents ouptput.