Bind this macro to a key:

/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetN ame())

Hover your mouse over the button that you need to know the name of, press the key you've bound the macro to and the name of the button will appear in the chat window.