Now that we have everything up and running, let's get familiar with VSCode. Go ahead and open VSCode if you haven't already.
We will be looking at panels on the side first. From top to bottom, we have
Explorer contains a list of all directories and files in your project. While we will be learning this in the coming chapters, here is a screenshot of how your screen will look when you have a project open, with a
- Open Editors shows all currently open files. In the screenshot, we have our actual
testClass.clsfile that contains the
testClass.cls-meta.xmlthat contains information about the test class, that VSCode auto generates. This is a SOAP API that is used to transfer our code to the org we are working in, and is handled automatically.
- Test Org is the name I've given to my project I just created. We go over this when we discuss connecting VSCode to our org and will be clear in the coming chapters. Just know, that every single project you create, it'll add a new subsection with the name.
- Outline contains all classes and objects we have created.
- Timeline contains a history of all our git commits and our code runs.
- Running Tasks lists all currently running tasks.
Another really great feature in VSCode is the mini map available on the right side. This is handy when you have a file that contains a lot of code and having a mini map allows you to navigate more quickly. Let's populate the
testClass with random methods and see it in action:
Search is exactly what you expect it to be, a search bar on the left, type your query, press enter and you have results available.
Source control is for versioning our work and file systems. It uses git and has inbuilt access to publish to GitHub directly. We go more over this in a separate mini-course Git and Collaboration Mini-course that explains what git is, setting up and how to collaborate with other users using git. For now, we are competely ignoring this because it's out of scope for this mini course.
This is used to run our code based on configurations. For most parts, we will be using the
SFDX: Execute Anonymous Apex with Editor contents to run our code.
Extensions is where we get our add-ons for VSCode. This is where we got our Salesforce Packages from.
When we sign in to accounts, they show up here.
All your settings live here. This is also where you can select theme for VSCode. I am using the
Dark+ (default dark) theme. This only changes your color scheme, so it's safe to play around with. You can get more themes
from extensions panel by searching for
category:themes or heading over to my recommended VSCode Theme website, VSCodeThemes. (Not affiliated in any way.), or you can search
the internet for more VSCode themes if you like.