If you want to generate code with the vSphere Client, you should use the Fling. The vSphere Client Fling has the option to generate code from your actions. It can generate PowerCLI, Python and vRO JavaScript code.
Go to the new Developer Center option and enable Code Capture.