I didn't realise the Webprofiler module has now been spun out of Devel. Took me ages to realise that some of my local dev sites failing was because the recommended Drupal 9 snippet for settings.local.php was failing.
- Update the Devel module.
- Then install Webprofiler module
- Change your relevant settings.local.php snippet to include:
// Webprofiler settings
$class_loader->addPsr4('Drupal\\webprofiler\\', [ $app_root . '/modules/contrib/webprofiler/src']);
$settings['container_base_class'] = '\Drupal\webprofiler\DependencyInjection\TraceableContainer';