In my form validation and submit functions,
kpr() is not being called. Is there a better way to check that I'm in those functions? If
kpr() isn't ideal to output my
$form_state array, then what is ideal?
Everything that is output with
drupal_set_message() (the function that
kpr() uses to output the message) could not be visible from the browser if code redirects the user to another page after
drupal_set_message() is called and before the page is rendered. After a form is submitted, the users are redirected to a page whose URL is set in
$_GET['destination']; the latter takes the precedence over the former.
To avoid the users are redirected after the form is submitted, you can:
TRUE would have the same effect, but form builder functions, form validation handlers, and form submission handlers should never set
A preferred method would be calling watchdog(). If you have the Database Logging module enable, then the message output from the module will be visible in admin/reports/dblog.
For debugging messages, you can call
WATCHDOG_DEBUG as value for the