Salesforce 开发新工具 - Visual Studio Code

最近尝试使用Visual Studio Code来做Salesforce的开发工具,体验上比Sublime好用不少,介绍下详细步骤

 

第一步:下载对应版本的Visual Studio Code

下载地址:https://code.visualstudio.com/

选择对应的版本选择下载,然后进入VS Code 安装界面

保持默认设置,一直选择下一步进行即可,安装完成后就能看到VS Code的操作界面

 

第二步:安装 Salesforce CLI

操作系统   安装地址
Mac OS https://sfdc.co/sfdx_cli_osx   
Windows-32-bits    https://sfdc.co/sfdx_cli_win  
windows-64-bits https://sfdc.co/sfdx_cli_win64  
Debian/Ubuntu 64 https://sfdc.co/sfdx_cli_linux  
Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script. 
Debian/Ubuntu x86  https://sfdc.co/sfdx_cli_linux_x86  
Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script. 

 

 

 

 

 

下载好双击安装,跟着默认安装即可

 

安装好了之后可以在命令行输入sfdx COMMAND命令进行校验

 

第三步:在VS Code上安装 Salesforce Extension Pack 插件

打开 VS Code,点击 Extensions  

在搜索框中输入 Salesforce Extension Pack ,点击 Install 安装

 

安装完成后,重启电脑让软件安装时的环境变量生效.

重启电脑后,打开VS Code,快捷键 Ctrl + Shift + P,输入SFDX出现如下界面则安装成功

 

  *  若安装失败或不能出现上述界面,请检查 JDK版本,支持 JDK8 和 JDK 11

  *  配置JDK可以参考参考资料4,配置VS Code中的JDK环境参数

  MacOS:

  {
    "salesforcedx-vscode-apex.java.home": "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home"
  }

  Windows:

  {
    "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.3.7-hotspot"
  }

参考资料链接

 1.Salesorce Trailhead : Visual Studio Code for Salesforce Development

 2.Salesforce Extensions for Visual Studio Code

 3.Java JDK

 4.Java Setup

 

posted @ 2019-07-12 22:14  Ricardo.M.Lu  阅读(2822)  评论(0编辑  收藏  举报