Best Practices

Fixing Salesforce Developer Console Freezes: A Simple Solution

Fix Developer Console freezes in Salesforce with Bo Laurent's VisualForce page. Easy implementation, no scripting required.

Last Update:
May 23, 2023
Published:
April 10, 2018

In this article, we'll discuss how to resolve a common issue that many Salesforce Developer Console users face: unexplained console freezes. Leveraging a brilliant open-source solution developed by Bo Laurent, we will provide a step-by-step guide to using her VisualForce page, designed to reset the developer console state and allow you to continue your work with minimal interruption.

Here are 5 key takeaways:

  • Bo Laurent's VisualForce page provides a simple fix for a common Salesforce Developer Console issue.
  • The solution is open-source and freely available on GitHub, making it accessible for all developers.
  • The VisualForce page uses straightforward Javascript, which does not require command line arguments or scripting, making it easy to implement.
  • Installation is simple: just create a VisualForce page and paste in the code from the DeveloperConsole.page.

Table of Contents

Troubleshooting Salesforce Developer Console Freezes

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.

Understanding the Console Freeze Issue

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).

Step-by-Step Guide to Implementing the Fix

Installation is simple. Just create a VisualForce page and copy and paste in the code from this DeveloperConsole.page. 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.

Enhancing Your Salesforce Development Experience

Resolving the frustrating issue of console freezes in the Salesforce Developer Console is now made easier with Bo Laurent's ingenious fix. This open-source VisualForce page provides a simple and accessible solution for developers, allowing them to reset the console state and continue their work seamlessly. 

By implementing the step-by-step guide provided in this article, you can overcome this common challenge and enhance your Salesforce development experience. 

If you're looking for a comprehensive solution that goes beyond the Developer Console, we alsoencourage you to explore Blue Canvas. With Blue Canvas, you can streamline your Salesforce deployment process, achieve efficient continuous integration, and unlock the full potential of your development workflow. Experience smoother deployments with Blue Canvas today.

FAQ: Salesforce Developer Console bug 

What is the common issue addressed in this article?

  • The common issue addressed in this article is unexplained console freezes experienced by users of the Salesforce Developer Console.

How does Bo Laurent's VisualForce page help in resolving console freezes?

  • Bo Laurent's VisualForce page provides a solution to clear the developer console state, allowing users to fix the freezing issue and continue their work without interruption.

Is the solution open-source and freely available?

  • Yes, the solution provided by Bo Laurent is open-source and freely available on GitHub, making it accessible to all developers.

What programming language is used in the VisualForce page?

  • The VisualForce page uses straightforward JavaScript to implement the fix, eliminating the need for command line arguments or scripting.

Does implementing the solution require command line arguments or scripting?

  • No, the implementation of the solution does not require command line arguments or scripting. The VisualForce page simplifies the process by hosting simple JavaScript code that can be easily used by Salesforce developers of all skill levels.

How can I install the VisualForce page in my Salesforce environment?

  • To install the VisualForce page, you need to create a VisualForce page in your Salesforce environment and copy and paste the code provided in the DeveloperConsole.page file. The URL for the page will be "/apex/YourPageName".

What is the purpose of the "Delete my IDEWorkspace" button on the VisualForce page?

  • Clicking the "Delete my IDEWorkspace" button on the VisualForce page refreshes the state of your IDE and resolves the console freezing issue. It allows you to continue your work without the console hanging.

Can I use the VisualForce page in both Sandbox and production environments?

  • Yes, you can use the VisualForce page in both Sandbox and production environments of Salesforce.

What is the JSforce library, and how does it relate to this solution?

  • The JSforce library is a JavaScript library that allows developers to build Salesforce apps using JavaScript. It provides an interface to various Salesforce APIs and includes a CLI and REPL. While it is not directly related to this specific solution, it is mentioned as a great resource for developers interested in Salesforce and JavaScript.

Which Salesforce APIs are supported by the JSforce library?

  • The JSforce library supports various Salesforce APIs, including the REST API (SOQL, SOSL, describe, etc.), Apex REST, Analytics API, Bulk API, Chatter API, Metadata API, Streaming API, and Tooling API. It provides developers with the ability to interact with these APIs directly using JavaScript.

More like this