How to set Developer DashBoard programatically.

When Developer dashboard is set on demand then you will find an icon at  top right corner to launch it.