function debug

cis7 debug($data, $label = NULL, $print_r = FALSE)
cle7 debug($data, $label = NULL, $print_r = FALSE)
elmsmedia7 debug($data, $label = NULL, $print_r = FALSE)
icor7 debug($data, $label = NULL, $print_r = FALSE)
meedjum_blog7 debug($data, $label = NULL, $print_r = FALSE)
mooc7 debug($data, $label = NULL, $print_r = FALSE)

Outputs debug information.

The debug information is passed on to trigger_error() after being converted to a string using _drupal_debug_message().


$data: Data to be output.

$label: Label to prefix the data.

$print_r: Flag to switch between print_r() and var_export() for data conversion to string. Set $print_r to TRUE when dealing with a recursive data structure as var_export() will generate an error.

6 calls to debug()
views_debug in sites/all/modules/ulmus/views/views.module
Provide debug output for Views.
views_handler_field::add_additional_fields in sites/all/modules/ulmus/views/handlers/
Add 'additional' fields to the query.
views_plugin_style::render in sites/all/modules/ulmus/views/plugins/
Render the display in this style.
views_xml_backend_plugin_query_xml::parse in sites/all/modules/ulmus/views_xml_backend/
_fe_block_get_bid in sites/all/modules/ulmus/features_extra/fe_block.module
Provided for backwards compatibility. Use fe_block_get_bid() instead.

... See full list

29 string references to 'debug'
adaptivetheme_form_system_theme_settings_alter in sites/all/themes/ulmus/adaptivetheme/at_core/theme-settings.php
@file Implimentation of hook_form_system_theme_settings_alter()
alpha_alpha_preprocess_html in sites/all/themes/ulmus/omega/alpha/template.php
Implements hook_preprocess_html().
alpha_grid_include in sites/all/themes/ulmus/omega/alpha/includes/
Includes all active layouts for a specific column count of the grid in charge for the current theme and also adds the corresponding grid debugging CSS if debugging is enabled.
alpha_page_alter in sites/all/themes/ulmus/omega/alpha/template.php
Implements hook_page_alter().
alpha_theme_container::settings in sites/all/themes/ulmus/omega/alpha/includes/

... See full list


includes/, line 7515
Common functions that many Drupal modules will need to reference.


function debug($data, $label = NULL, $print_r = FALSE) {
  // Print $data contents to string.
  $string = check_plain($print_r ? print_r($data, TRUE) : var_export($data, TRUE));

  // Display values with pre-formatting to increase readability.
  $string = '<pre>' . $string . '</pre>';

  trigger_error(trim($label ? "$label: $string" : $string));



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.