[[debug()]]
Translations of this page:
 

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.

  • object
    • The ID of a data variable or a placeholder, or
    • A PHP variable (Variables)

Tip: For more information on usage, see Solving Questionnaire Problems.

Important: The function debug() produces output only if the questionnaire was started in debug mode Start questionnaire in debug mode. In the preview (Preview questionnaire) and in regular interviews debug() has no function.

Examples

// 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);

Display Debug Information

en/create/functions/debug.txt · Last modified: 25.08.2020 12:13 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki