Questions tagged [vs-code]

Visual Studio Code is a free source code editor developed by Microsoft for Windows, Linux and macOS. When the "Salesforce Extensions for VS Code" are added it: supports syntax highlighting and intelligent code completion for Apex, Visualforce and Lightning Components; works well with SFDX including with scratch orgs; supports debugging. Git UI is built in. Many other extensions are available.

1
vote
0answers
25 views

VS Code Salesforce plugin deploy does not provide an error message

VS Code plugin for salesforce seems to be broken yesterday, It does not provide proper error message in case of failure. Tried this in a developer org as well as scratch org. Neither deploy code or ...
2
votes
1answer
25 views

How to run the command “sfdx force:apex:test:run” so that System.debug statements are printed in the console?

I love the option of running test methods from VSCode by clicking on Run Test link that appears below the @isTest annotation. This works well but when a test method fails, I go ahead and add a System....
0
votes
1answer
40 views

How to take complete backup of salesforce org using VS Code

I am using VS code And installed below two packages Salesforce CLI Integration (https://developer.salesforce.com/tools/sfdxcli) Salesforce extension And Want to take complete backup of org, when I ...
2
votes
0answers
18 views

How to setup ESLint in VSCode to work with every project?

Below is the process I am doing in VSCode to setup for every project I create: run command npm init from project folder and this is creating package.json file. Run the command eslint --init and it ...
0
votes
1answer
39 views

How to get non-SFDX folder structure in VS Code in Dev Hub enabled Org?

We have enabled Dev Hub in our org but we are not using Salesforce DX. Since Dev Hub is enabled, when we create projects, we get SFDX folder structure. But when we do code merge, our code repository ...
6
votes
2answers
52 views

In VSCode is it possible to make SFDX Retrieve Source From Org confirm before proceeding?

I'd like VSCode to confirm with me when I run command: SFDX Retrieve Source From Org Before proceeding, because I regularly select the wrong option when right clicking. Is there a setting or option ...
0
votes
1answer
56 views

Invalid decorator usage. Supported decorators (api, wire, track) should be imported from “lwc”

I started working with Lightning Web Components and was doing the Quick Start: Lightning Web Components project, on deploying source to org, I am getting the following error in VS Code output Panel ...
0
votes
1answer
27 views

Using SFDX to retrieve the report meta data

I need to check if a field is being used in any of the reports in the org. So I created a sandbox environment and created a manifest project in VScode; then authorized the sandbox org and ran the ...
3
votes
2answers
71 views

Don't see option “SFDX: Push Source to Default Scratch Org” in the command palette in VS Code

I have an sfdx project opened in VS Code as workspace folder. I don't see the option for "SFDX: Push Source to Default Scratch Org" in the command palette. Other commands like "SFDX: Refresh SObject ...
3
votes
2answers
58 views

Do I really need to install Prettier locally?

Well, I am trying to set up code formatting process in my project and I am following this guide Set Up the Prettier Code Formatter for Salesforce Projects where steps 1 and 2 include installing ...
0
votes
1answer
34 views

Error while creating Heroku pipeline from VSCode

So, I am trying to create Heroku pipeline from VSCode. I ran the command ./setup.sh In my setup.sh file I've set HEROKU_APP_NAME and verified "Usernames or aliases of the orgs you're using" and also ...
7
votes
1answer
247 views

Visual representation code coverage in VSCode

As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below: sfdx force:apex:test:run -c -u myOrg -r ...
0
votes
2answers
75 views

DevHub and Scratch Org command to open project missing username

I have recently installed VS Code and migrated my projects from Eclipse over to VS Code. I'm getting familiarized with the IDE. I've gotten my projects created and authorized and have successfully ...
2
votes
1answer
96 views

No code coverage information was found for test run 7070U00000r8Ny3. Set “salesforcedx-vscode-core.retrieve-test-code-coverage”: true

In user setting.JSON I am using { "salesforcedx-vscode-apex.java.home":"C:\\Program Files\\Java\\jdk1.8.0_131", "salesforcedx-vscode-core.show-cli-success-msg": true, "salesforcedx-...
1
vote
1answer
301 views

sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations

While deploying code in vsCode from sandbox to production I get the below error sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations As per ...
1
vote
0answers
22 views

VSCode is checking my static resource JS files as if they are LWC

I have some JS files in a static resource. I pulled code from a Production org and converted to DX format for convenience. I am noticing when I open them in VSCode I get errors like "LWC1007: c:\foo\...
0
votes
2answers
185 views

ERROR running force:project:create: Cannot read property 'create' of undefined

I am trying to follow a Trailhead which instructs me to create a SFDX project in VS Code. I've been using VS Code for awhile and all is current. While troubleshooting this issue, I did update my ...
0
votes
1answer
49 views

Missing manifest and package.xml in new project

I've just installed VS Code and am migrating my projects. I don't see an option to delete a project? I created a project without the manifest and package.xml so I can't retrieve the selected metadata ...
0
votes
1answer
123 views

unzip' is not recognized as an internal or external command

When i run this command in VS Code terminal unzip -o metadata/unpackaged.zip -d metadata i get an error like this unzip' is not recognized as an internal or external command, operable program or ...
1
vote
0answers
49 views

Im not able to see “Authorize an Org” in my command palette

I have installed the Cli and Salesforce Extension pack. Why can I not see "Authorize an org" in my command pallet?
4
votes
3answers
690 views

Deploy lightning web component is getting failed with error - “--json --loglevel fatal ended with exit code 1”

I am trying to deploy a lightning web component to the org using vs-code but getting the error. Starting SFDX: Deploy Source to Org 10:09:14.43 sfdx force:source:deploy --sourcepath d:\Aakriti\...
1
vote
0answers
31 views

Use Semantic Completion with Tabnine in VsCode

Have any of you tried to use TabNine Semantic Completion with VsCode? I tried to use the configuration below but it always crashes. Just want to make those three great tools to work smooth (VsCode, ...
0
votes
1answer
32 views

Salesforce DX Usage with Classic and team work using scratch org

We are currently using Salesforce Classic and we have developers outside of United states using the remote desktops to login to the client machine and then using SF. I have seen the seminars for SFDX,...
1
vote
0answers
116 views

'ENOENT': spawn cmd ENOENT error while authorizing sandbox org in VSCode

Hi I have installed VS Code and salesfoce CLI, extensions also. I have created my first project. When i am tryin to authorize org in it i am getting below error: Starting SFDX: Authorize an Org 14:...
1
vote
4answers
1k views

Authorize Org failed in VS Code

I am new in learning lightning web component. I have installed VS Code, salesforce extension pack inside VS code, Salesforce CLI and set environment variable C:\Program Files\Salesforce CLI in my ...
1
vote
1answer
32 views

SFDX cli throwing eslint error

Does anyone have any ideas on how to fix this? It just randomly started happening when using vscode: This is how my current sfdx-project.json file looks like: { "packageDirectories": [ { ...
0
votes
1answer
110 views

VSCode Debug Add Configuration error Cannot read property 'openConfigFile' of undefined

I created a Salesforce project in VSCode and when I try to debug Apex Classes adding a Debug Configuration I get the following error: Cannot read property 'openConfigFile' of undefined I'm using the ...
2
votes
2answers
811 views

Migrate from Force.com IDE to VScode

We want to migrate from Force.com IDE to VScode. I have some questions around this. Can we use metadata format (src folder) with vscode, if yes than how? if not then, Would migrating to source ...
2
votes
2answers
46 views

Creating a project from sandbox using vscode

We donot have sfdx enabled in our instances. Can I use vscode IDE and create a proejct from sandbox with any of the salesforce extensions. I see the documentation around creating a scratch org, then ...
1
vote
2answers
1k views

SFDX - No org configuration found for name

Suddenly vscode stopped working with deploying the class to the sandbox I'm using and throws this message "No org configuration found for name INSTANCE NAME" I tried to create a new project for the ...
2
votes
1answer
36 views

Update sObjects in .sfdx/typings

I have a VSCode SFDX Project that we use to develop LWCs, and we recently changed some object names in the Org and now I can't upload anything to our Org. I found that there is a command to refresh ...
1
vote
1answer
38 views

Salesforce ORG Development Model Migration

I am just starting out with my first migration using the salesforce org development model in VS Code. I pulled in my project from my sandbox environment and made my changes and deployed my file back ...
0
votes
0answers
69 views

Cannot create a scratch org, getting “ERROR: Cannot read property 'HANDSHAKE' of undefined.”

I followed steps in https://trailhead.salesforce.com/content/learn/projects/set-up-your-lightning-web-components-developer-tools/create-a-lightning-web-component : installed CLI, updated VS Code, ...
1
vote
0answers
60 views

SFDX: retrieve Source from Org failing

In order to connect my VSC to my org and pull my org's datas to VSC, I followed the steps this great video shows ; In Visual Studio Code I : - SFDX: created project with Manifest - in the manifest -> ...
2
votes
1answer
111 views

ERROR: Cannot create an AuthInfo instance that will overwrite existing auth data

Background I get this error message: ERROR: Cannot create an AuthInfo instance that will overwrite existing auth data. In the VSCode output panel, when I try and run a unit test: Starting Run ...
3
votes
1answer
34 views

How to see sfdx commands processing indicator in VSCode

Is it possible to see some processing/loading indicator when I do sfdx commands in vscode terminal?
0
votes
0answers
48 views

sfdx.force.test.view.refresh not found

Summary When trying to use the integrated test side bar, no tests are being displayed. When clicking on "refresh" an error message is displayed saying "command 'sfdx.force.test.view.refresh' not ...
0
votes
0answers
35 views

VS code adds quotes in LWC

This is infuriating. I copy and paste this html from the trailhead module: <template> <lightning-card title="HelloWorld" icon-name="custom:custom15"> <div class="slds-m-...
0
votes
1answer
177 views

Deploy metadata to different org using VS Code

When I used Illuminated Cloud (IC), I could deploy the metadata in the workspace to another org by selecting the Deploy All Metadata option from the context menu and select a different org to deploy ...
3
votes
2answers
107 views

How to get custom object fields displaying in code completion in VS Code

I am trying out the VS Code and wondering if it could be possible to display custom object fields while typing an apex code. At the moment the fields are not displayed: But when I take some standard ...
0
votes
1answer
90 views

Salesforce CLI Authorization timeout

I am attempting to setup VS Code with Salesforce CLI. I am experiencing issues when attempting to authorize my Sandbox. When I attempt to authorize, I enter the MyDomain login page address and set ...
0
votes
0answers
96 views

SFDX VSCode Workspace with Multiple Orgs

I'm working on combining several orgs into a single org. As part of my requirements, until the process is complete, I created some code that syncs up data from the "primary" org back into 3 "legacy" ...
2
votes
0answers
28 views

How to get Twilio for Salesforce Apex API intellisense in VSCode

I have this Twilio package installed (in both environments): Twilio for Salesforce: Production / Sandbox I am using VSCode to build against the Apex Query Library: Example Apex TwilioSF....
1
vote
1answer
94 views

ERROR: No AuthInfo found for name [object Object]

Ad the title described, I have the following error: ERROR: No AuthInfo found for name [object Object]. What i did was to install a whole new clean visual studio code, with the related salesforce ...
1
vote
0answers
275 views

Deploy Source in Manifest to Org - ended with exit code 1 and no response in problem tab

I have a local Salesforce DX project with a package.xml manifest file. The project has been authorised against a fresh developer org. I want to deploy all my local code in one go, so I am using the ...
1
vote
1answer
26 views

plug icon is missing with default org name in vscode

As per the documentation "Change or Open Your Default Org", In vscode, I should see plug icon with the default org name but it disappeared from last few days. Here is the screenshot(stolen from this ...
1
vote
1answer
167 views

Setup Salesforce(Sandbox) project in Visual Studio Code and integrate source control with Bitbucket

I am new to VS Code, things I was able to do separately are Create a Salesforce Manifest project and authorize the org, Retrieve/Deploy are good. Have a repository on Bitbucket, cloned it on the VS ...
2
votes
4answers
570 views

Should the .gitignore include an entry for .vscode when using Git and VSCode

wadewegner has an example .gitignore file with the below content .DS_Store .sfdx .project .salesforce .settings node_modules .idea As part of his sfdx-simple app on GitHub. Should this file include ...
0
votes
0answers
33 views

Load report-meta directly in production (testLevel problem)

Since in my org we made some (heavy) changes to the custom objects, we also had the need of redoing all the reports (yeey, such luck!) So what I did, was simply to download all the reports locally, ...
1
vote
1answer
291 views

LWC Deployment Errror

I'm trying to create a basic LWC for a Community which would be a button where Community admins could set the button text and the page value it should link to. I don't have any Problems, but when I ...