用Visual Studio Code架设Salesforce DX的快速开发IDE环境
- 11月
- 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.
Search “ForceCode” and install it.
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.
Now you can refresh, edit and deploy metadata 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!
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

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.





package.xml


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.



Enjoy it!
Post Tagged with Force, IDE, mavensmate, Metadata, Salesforce DX, Sublime Text 3, Visual Studio, Visual Studio Code, VS Code
近期文章
- 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的开发者用户突破10,000名!THANK YOU!
- Lightning Component中使用Promise处理Apex服务端请求
Top Posts
- Salesforce DevTools – Saleforce开发者必备Chrome扩展 - 226.3K views
- Date format 与 DateTime format - 209.6K views
- Salesforce批量编辑 (Chrome扩展) – 在任何标准视图上进行批量插入, 拷贝, 更新, 删除, 支持Classic与Lightning! - 160.9K views
- 编写一个可被计划执行的Batch Apex - 124.5K views
- 用Sublime Text 3架设Salesforce的快速开发环境 - 123K views
分类目录
- APEX
- 应用
- Custom Label
- Custom Metadata
- Custom Setting
- Design & UI
- 交流会
- 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
您必须登录才能发表评论。