This module adds a contextual link to every form that lets you easily find out form's ID, name of hook_form_FORM_ID_alter() hook and print out form's variables. The module is a successor of Get Form ID (https://www.drupal.org/project/get_form_id) which is deprecated from now on.
By hovering over any form you will see a contextual link available. By expanding the link you will see the form ID. Click on the link and you will see a modal window with copyable form id and hook_form_FORM_ID_alter() hook suggestion.