Yes, "Delete my IDEWorkspace" sounds a little scary. But that's actually what this script will do. The developer console state is maintained in a record in table IDEWorkspace. When that record is deleted, there is no state. If the dev console decides to save something, it notices that and creates a new record.

This is not really documented anywhere. You can learn a little bit by reading the Salesforce help article Developer Console menus not working The API we are using is the Tooling API. The documentation merely notes that "The following Tooling API objects are used internally by the Developer Console."