White screen of death in hook form alter
It seems that dsm() and dpm() are not supported in Drupal 8. They are replaced by kint(). I have enabled the devel kint sub-module and used kint($form) to print my form array. You can also use ksm($form).