You can enable debug mode like this:
Java
config.setDebugSettings(new DebugSettings().setAll(true));
C#
config.DebugSettings = new DebugSettings { All: true };
JavaScript/Node.js
config.debugSettings = { all: true };
PHP
$config["debugSettings"] = array("all" => true);
Python
config['debugSettings'] = { "all": True }
Ruby
config['debugSettings'] = { "all": true }
Perl
$config["debugSettings"] = { "all" => true };
REST
{ "debugSettings": { "all": true }}
CLI
--debug
More information about the debug mode can be found here.