I write tests for a custom module using Drupal\simpletest\WebTestBase. I can not find a method, how to debug the configuration object.
I tried e.g. the following commands:
$config = \Drupal::config('mymodule.settings');
debug($config); // AJAX-HTTP-Error
debug(get_object_vars($config)); // Empty array
debug($config->getRawData()); // Empty array
debug($config->getOriginal()); // Empty array
dump($config); // AJAX-HTTP-Error
var_dump($config); // Needs extremely long time
ksm($config); // Nothing is shown
kint($config); // Nothing is shown
dpm($config); // ServiceNotFoundException
dpm($config->toArray()); // AJAX-HTTP-Error
dsm(get_object_vars($config)); // ServiceNotFoundException
print_r($config); // Needs extremely long time
The debug() command works fine for arrays and strings (and is nice integrated in the test report).
debug($var, 'Label');