====== debug() ======

''void **debug**(mixed //object//)''

The function ''debug()'' conveniently shows the project manager the content of a PHP or data variable or a placeholder in debug mode. This is particularly helpful when monitoring filters and, as the case may be, as [[:en:create:filter-solving|Problem Solutions for Filters]]

**Note:** The content of the respective variable is only shown if the questionnaire is started in debug mode {{:button.debug.gif?nolink|Start Questionnaire in Debug Mode}}.

  * //object//
    * The ID of a data variable or a placeholder, or
    * A PHP variable ([[:en:create:variables|Variables]])


===== Examples =====

<code php>
// Display response before the filter for the selection AB01 is executed
debug('AB01');
if (value('AB01') == 2) {
  goToPage('end');
}

// Placeholders
$random = random(1,10);
if ($random == 1) {
  replace('%category%', 'employee');
} else {
  replace('%category%', 'superior');
} 
debug('category');

// Show PHP variable
$itemlist = getItems('AB09', 'min', 2);
debug($itemlist);
</code>

{{:de:create:functions:scr.debug.png?nolink|Display Debug Information}}