Best Practices

Developer Console Not Loading - A Cool Fix!

Salesforce Developer Bo Laurent has published an ingenious fix for a perplexing Salesforce Developer Console bug.

April 10, 2018

If you are a frequent user of the Salesforce Developer Console, you have probably run into an issue where the console simply hangs up, but no error message is provided. Not knowing what went wrong can be frustrating. Fortunately, Salesforce developer extraordinaire Bo Laurent has just released something which makes solving this problem much simpler: a new VisualForce page that clears a Salesforce user’s developer console state. It’s open source and free on GitHub and is a great gift to the community.

Googling “Salesforce Developer Console Not Loading” led Bo to this fix from Salesforce. But being a determined developer, Bo was not satisfied. First, she built a Python script to automate the fix, but even then felt she could go further.

Then the idea struck her: a simple VisualForce page would allow her to create a button that just fixes the problem and lets a developer continue their work. Using a VisualForce page to host some simple Javascript was ingenious because it makes it easy for Salesforce devs of all stripes to use. You don’t have to use command line arguments or scripting. You don’t even need to understand Javascript. And the VisualForce environment takes care of authentication for you. Because there’s no server-side code, you can just paste the page into Salesforce, even a production instance (no unit tests are required, so no deployment is needed).

Installation is simple. Just create a VisualForce page and copy and paste in the code from this The URL for the page will be /apex/YourPageName. You can do this in your Sandbox or your production environment.

Once you’ve done this, you can visit the URL for that VisualForce page and click the “Delete my IDEWorkspace” button. Clicking this will refresh the state of your IDE and make the Dev Console stop hanging. It’s really that simple.

Bo built the fix using the JSforce library - which allows you to build Salesforce apps with Javascript. The JSforce library allows developers to interface with various Salesforce APIs directly through Javascript. It also includes a CLI and REPL. The library supports the following APIs:

  • REST API (SOQL, SOSL, describe, etc.)
  • Apex REST
  • Analytics API
  • Bulk API
  • Chatter API
  • Metadata API
  • Streaming API
  • Tooling API

It’s a great resource for developers that are interested in Salesforce but more comfortable with Javascript. And it’s a great tool for Salesforce developers that want to improve their knowledge of Javascript.

Thanks, Bo!

More like this