![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Salesforce20Execute20Anonymous20Window20in20VS20Code.jpg)
1. Under Scripts folder, open the default hello.apex file. You can also create a new file with the extension “.apex”.
2. Open the file by clicking it twice.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Apex20Scripts20Salesforce20VS20Code.png)
3. Use SFDX: Execute Anonymous Apex with Editor Contents to execute the apex code developed in it.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Execute20Anonymous20in20Salesforce20VS20Code.png)
4. Execution result will be in the Output panel.
![](https://www.infallibletechie.com/wp-content/uploads/2022/06/Salesforce20Execute20Anonymous20Window20in20VS20Code20Result.png)