Setup Salesforce DX IDE environment with Visual Studio Code
- Nov
- 12
- Posted by Lin
- Posted in Salesforce
My favorite Salesforce IDE MavensMate is no longer being developed and supported, because of app owner Joe’s personal reasons. I’m deeply moved when I read his post (HERE) and realize that devoting to open source needs huge strength and courage, it costs so much personal time other guys can’t see.
So as a Force.com developer, which IDE we should choose instead of MavensMate? I don’t have an answer right now, but Joe recommended the IDE Visual Studio Code, which has an extension like Mavensmate named ForceCode and a Salesforce’s official Visual Studio Code plugin for using Salesforce DX, in this post, I want to share how to setup VS Code for Force.com development.
Drop folder to VS Code window and open Command Palette (⇧+⌘+P), type “SFDX” and choose Authorize a Dev Hub menu. You can also run sfdx force commands on VS Code TERMINAL console as below: That’s all. Salesforce Extension for VS Code provides almost command menu type but not a friendly GUI interface to developers, be honest I still don’t really used to run Salesforce DX command on VS Code though, I’ll share more about Salesforce DX development environment in next posts.
Enjoy it!
So as a Force.com developer, which IDE we should choose instead of MavensMate? I don’t have an answer right now, but Joe recommended the IDE Visual Studio Code, which has an extension like Mavensmate named ForceCode and a Salesforce’s official Visual Studio Code plugin for using Salesforce DX, in this post, I want to share how to setup VS Code for Force.com development.
1. Installing Visual Studio Code
Download Visual Studio Code and install VS Code from below:2. Installing ForceCode Extensions for VS Code
Open extension manager by clicking extension sidebar or pressing ⇧+⌘+X Search “ForceCode” and install it.3. New Salesforce Project
Create a folder “YOUR_PROJECT” in local and drop to Visual Studio Code window.4. Retrieving Metadata from Salesforce
Open Command Palette (⇧+⌘+P) and type “force”, then choose Refresh from server menu. Type in username and password of your Salesforce org. Choose Salesforce org type, Production / Developer or Sandbox. Choose Yes to automatically deploy metadata to Salesforce on save file. Choose Retrieve by package.xml if you already have a “package.xml” file like below, if not, run Get All Files from org, retrieving all metadata may cost a lot of time.package.xml
Now you can refresh, edit and deploy metadata as below :5. Running Salesforce DX in VS Code
If you already have a Dev Hub and installed Salesforce DX in local, you can also run Salesforce DX in VS Code with “Salesforce Extensions for VS Code”. Reference this post 《Works with Salesforce Developer Experience (DX)》 to learn about basic usage of Salesforce DX.1. Installing Salesforce Extensions for VS Code
Install “Salesforce Extensions for VS Code” extension as below:2. New Salesforce DX Project
Create a folder “SFDX_Project” and new a file “sfdx-project.json” as below:Drop folder to VS Code window and open Command Palette (⇧+⌘+P), type “SFDX” and choose Authorize a Dev Hub menu. You can also run sfdx force commands on VS Code TERMINAL console as below: That’s all. Salesforce Extension for VS Code provides almost command menu type but not a friendly GUI interface to developers, be honest I still don’t really used to run Salesforce DX command on VS Code though, I’ll share more about Salesforce DX development environment in next posts.
Enjoy it!
Post Tagged with Force, IDE, mavensmate, Metadata, Salesforce DX, Sublime Text 3, Visual Studio, Visual Studio Code, VS Code
Recent Posts
- Salesforce DevTools Release Notes (version 3.10.0) – mass edit custom fields on lightning
- Salesforce DevTools Release Notes (version 3.9.0) – Object Fields, SOQL Query Editor
- Salesforce DevTools Release Notes (version 3.8.0)
- Salesforce DevTools JUST HIT 10,000 USERS! THANK YOU!
- Using Promise for Apex Server-Side request in Lightning Component
Top Posts
- Salesforce DevTools – Powerful Salesforce developer tools, loved by over 50K developers - 217.7K views
- Date format and DateTime format - 201.9K views
- Salesforce Mass Editor (Chrome Extension) – Mass create, mass update, mass clone, mass delete on any list view. Support for both Classic and Lightning! - 157.5K views
- Setup an awesome Salesforce developer environment with Sublime Text 3 - 121.8K views
- Writing a Schedulable Batch Apex in Salesforce - 116.9K views
Categories
- APEX
- Apps
- Custom Label
- Custom Metadata
- Custom Setting
- Design & UI
- Event
- Heroku
- iOS & Object-c
- Lightnint Component
- Linux & Mac OS
- Metadata API
- Node.js
- Open Source
- Other
- PHP Framework
- Release Notes
- REST API
- Salesforce
- Salesforce DevTools
- Salesforce DX
- SOQL
- Tooling API
- Unit Tests
- Validation Rule
- Visualforce
- WordPress
You must be logged in to post a comment.