/click MacaroonButton#

I found this handy script one the WOW UI+Macros forum

Put that in a action slot, click, it'll tell you what button it is (MacaroonButton1337, ActionButton12, etc)
Code:
/run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end