Switch to VS Code

5 Reasons, you should switch from Developer Console to VS Code

As we know, Salesforce offers its cloud IDE known as “Developer Console” where we can code for Apex or Aura. The developer console provides most of the functionalities needed to develop the components or write an Apex code. Apart from its use as IDE, it also provides additional features such as running test classes, executing SOQL Queries, checking the debug logs, etc.

In the initial days, it was a great tool to use for Salesforce development. All good things come with at least some drawbacks. In the same way, along with prominent features, the developer Console has its drawbacks, which may affect your speed of development. Now, we got many advanced IDEs such as VS Code, Sublime Text, etc and we can eliminate these drawbacks with the use of these advanced IDEs. In this article, we will look at the reasons for which you should switch from Developer Console to the VS Code.

It can save code only after a successful compilation

Imagine writing a code directly in the Developer Console. You are halfway and now need to switch to some other work. You try to save the code, but it’s not getting saved. The reason is the red dot behind the Problems tab. Yeah, the code is not getting compiled because of some errors.

The developer console will not save your piece of code unless it’s compiled successfully. This acts as a blocker many times. You cannot draft a code, or inactive version of code, just like we do with flows. The Developer Console will make your file read-only and you may not save the file if any deployment related to that file is going on. A good safety feature, so that ongoing deployment will not override your new code.

However, in the VS Code, you can save your code, which will remain in your system. You will be able to modify code anytime. We can deploy it on Salesforce Org whenever you want. It will give you an error at the time of deployment if any. 

Change tracking, Source Control

After getting blocked for saving your code, another nightmare would be the lack of version tracking. Once you change Apex Class from the developer console and you save it, there is no rollback! As it does not store different versions of your code, you cannot switch to your previous version of code. We can not use source control tools such as Git with the developer console.

In VS Code, with the help of git, we can manage different versions of code. This helps us to roll back to any previous versions whenever required. It is an easy-to-use Git with the VS Code. With the help of inbuilt support of Git in VS Code, git operations such as Push, Pull, and Commit can be easily performed. We can also create branches directly from the VS Code.

Slower Speed of Developer Console

I have noticed that the more I use the developer console (in one go), the more it’s getting slower. It might be storing some data locally at that time. I have faced issues even with opening the file. This cloud IDE performs lots of operations in the backend. This includes compiling the code, checking for logs, etc. Apart from these lags, it will put some weight on system RAM as well through the browser. 

VS Code is specially optimized for your local system and can do many jobs at the backend. It can handle many parallel operations simultaneously, but comparatively too faster than Developer Console. We can turn on logs only when required and it will compile code only on the Salesforce at the time of deployment. So, it gives us an optimized environment for working.

Power of VS Code extensions

The major advantage of using VS Code is extensions. There are lots of extensions available for the Salesforce on VS Code. Salesforce Extension Pack is the official set of extensions for Salesforce development. There are some cool extensions from a third party as well. Extensions work magically! The Apex Interactive Debugger is one of the powerful extensions that we can use for debugging. Extensions like Prettier are helpful for formatting the code. Some extensions will help us to check syntax errors in Apex, Aura, or LWC

Top VS Code extension for Salesforce by the number of installations

Extensions give out-of-the-box functionality for VS Code, which is not even available on Developer Console. Some extensions reduce our manual efforts by automating some tasks, such as adding comments. Finally, these extensions help us to boost our overall development speed and minimize errors.

Directly work on the metadata

A major setback for the Developer console, when compared with the VS Code, is we can not edit metadata of components directly from the Developer Console. With the help of the VS Code, we can directly edit the metadata of almost every component in Salesforce. We can modify the metadata of the page layout, and we can deploy it directly. We can make bulk modifications in fields with the help of metadata. There are many more things that we can achieve with this advantage of the VS Code.

Oh hi there!
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Read our privacy policy for more info.

Abhishek Patil
Abhishek
Salesforce Technical Lead at SFDC Hub

Mr. Abhishek, an experienced Senior Salesforce Developer with over 3.5+ years of development experience and 6x Salesforce Certified. His expertise is in Salesforce Development, including Lightning Web Components, Apex Programming, and Flow has led him to create his blog, SFDC Hub.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Shopping Cart
0
Would love your thoughts, please comment.x
()
x