Drupal How do I enable debug mode?

On a debug site I would recommend uncommenting the following lines in the file settings.php.

nano sites/default/settings.php

if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__
. '/settings.local.php';

In addition to adding the next setting:

$config['system.logging']['error_level'] = 'verbose';

It also adds a few other settings which will help you in debugging and making development easier. If you don’t want any of them in particular, you can always comment them out.