In the Script Editor, turn on History > Echo All Commands.
As you work in Maya, all the MEL commands Maya uses internally to execute actions and change the user interface will be printed in the Script Editor.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License