Skip to content

Standard ddm() output needs to be text

After latest updates, I write to the debug log with ddm() this is coming out as HTML in the log (temporary://drupal_debug.txt).

Steps to reproduce eg ddm('myrecvalue', date('Ymd His ') . **FUNCTION** . " recrecrec"); in funtion doTable() is seen as:

</style><div class="kint-rich"><dl><dt><dfn>20250818 143034 doTable recrecrec</dfn> <var>string</var> (10) "myrecvalue"</dt></dl><footer><span class="kint-folder-trigger" title="Move to folder">&mapstodown;</span><nav></nav>Called from &lt;drupal&gt;/modules/contrib/devel/src/DevelDumperManager.php:138 [Drupal\kint\Plugin\Devel\Dumper\DevelDumper->export()]

It should be be like '20250730 181843 doTable recrecrec => myrecvalue'

As an initial hack - this seems to work for log and does not break UI.

--- a/DevelDumperManager_1
+++ b/DevelDumperManager
@@ -135,7 +135,7 @@
    * {@inheritdoc}
    */
   public function debug($input, ?string $name = NULL, ?string $plugin_id = NULL) {
+    $output = $name . ': ' . print_r($input, TRUE) . "\n";
-    $output = $this->createInstance($plugin_id)->export($input, $name) . "\n";
 
     // The temp directory does vary across multiple simpletest instances.
     $file = $this->config->get('debug_logfile');

I'm not sure how to properly integrate this if people want HTML output etc

Edited by Jon J2S