Take this scenario. You have just built up this interest in coffee and now you want to expand from your instant coffee powder and milk, into something more serious. You go online, search for local coffee breweries and schedule a coffee training programme with them. A week later, you have a sophisticated coffee making process that's unique to you. Your coffee is made in a vaccum chamber so you get every last drop of coffee from your beans before you stir it up into the perfect shot of espresso.
Your toolset matters. Sure the developer console is a great instant coffee mix, you need something more powerful because developer console can only take you so far. When you start growing as a developer, you crave for that perfect place to build and debug your programs and this mini course introduces you to your vaccum chamber to brew your coffee.
Visual Studio Code
Visual Studio Code, or VSCode, is an IDE built and published by Microsoft and is available for free. The great thing about VSCode is it's really customizable and the industry is quickly embracing VSCode as a standard IDE outside of the developer console. Now, let's setup VSCode.
First, we need to download JDK or Java Development Kit from Oracle's website available here. Even if you do have JDK installed, install it again. This is to ensure you're always on the latest version of the software and really, it's just easier that way. I've seen people run into issues and not be able to figure things out for weeks at a time, only to then completely reset their system and start their machines from scratch.
Now download VSCode from their Visual Studio's Website for your platform and install and open it.
The first thing to do after you install and open it, is to go in
Settings and in
Commonly Used section, change
Auto Save to any option you prefer. I have kept it on
afterDelay set to
10000 so I don't have to worry about saving the file I am working on. The delay is in ms where 1 second = 1000 ms, so autosaving my file every 10 seconds works well.
Now open the extensions section and search for
Salesforce Extension Pack and install it.
While that is installing, we need Salesforce CLI tools on our machine. Head over to Salesforce CLI Website and install it for your platform.
Once done, it will show a pop up on bottom right off your screen.
Restart your computer. I've noticed this with multiple instances that developers don't restart their computer for days and run into errors, and yes, I've helped debug people from our Discord community with this, where the solution was simply, restart your computer. After your restart, open VSCode and press
Command + Shift + P for macOS users or
Shift + P for Windows users and type
SFDX. If you see commands popping up, you have correctly configured everything!
In the next chapter, we go over the UI and customize VSCode to suit our needs.Chapter 2: Understanding the UI