Salesforce 开发新工具 - Visual Studio Code

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

 

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

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

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

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

 

第二步:安装 Salesforce CLIjson

操做系统   安装地址
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. 

 

 

 

 

 

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

 

安装好了以后能够在命令行输入sfdx COMMAND命令进行校验jvm

 

第三步:在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

相关文章
相关标签/搜索