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.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

VS Code drops leading zero in picklist metadata values

I'm having picklist metadata problems with VS code and a regular sandbox (not a scratch org). I'm using source format with the sandbox. I have a picklist where some values have leading zeros, e.g. &...
0
votes
0answers
21 views

Unexpected file found in package directory:

I am trying to deploy some components from github branch to dev sandbox with VS Code I am on the branch, where I have a code, and connected to the sandbox. I tried: sfdx force:source:deploy -c -p ...
1
vote
1answer
480 views

VS Code autocomplete for LWC only shows up when using ctrl+space and not as I type

I am setting up my LWC dev environment with vscode but for some reason the intellisense for LWC only works if I hit ctrl + space, instead of showing up as I type. Here's what it look likes as I type: ...
1
vote
0answers
31 views

How to correctly enable Type checking in VSCode for LWC?

I wonder how to sucessfully configure type checking in VSCode for LWC. VSCode has JS/TS compiler that support type checking when we set jsconfig.json with compilerOptions like below: "...
2
votes
0answers
31 views

SFDX:Diff File Against Org command not working only for Apex Classes

In my VS Code, when I right-click on an Apex class I can't see 'SFDX:Diff File Against Org' command. But this is perfectly working for Aura components or Visualforce Pages. The problem only exists ...
0
votes
1answer
185 views

VS Code lightning Explorer not rendering anymore

This used to work for me. I tried re-installing the extension pack and nothing. Maybe somebody else is having the same issue.
3
votes
2answers
3k views

How do I retrieve a flow and associated metadata from an org?

I usually use SFDX to retrieve all of the metadata from my sandbox. I usually work on this in VSCode. Right now I'm trying to use SFDX in VSCode to retrieve a flow so I can test that flow in another ...
1
vote
1answer
20 views

VScode doesn't highlight/autocomplete code (salesforce extension pack)

This is what I see in VScode: I have the Salesforce extension packed installed, but I'm not sure everything's working correctly here. Keywords "with" and "sharing" are not ...
1
vote
2answers
49 views

Component not found in org after deployment from vs code

I am facing this weird issue where after I deploy my component/class from VS Code to org, it gets successfully deployed but when I am trying to find the same component/class in my org. I cant seem to ...
1
vote
2answers
95 views

Salesforce Git Repository using VS Code

I am trying to set up the Git Repo for our Salesforce instance, we are trying to use VS Code. This is my first time setting up and never used the ANT migration tool. We do manual Change set deployment ...
0
votes
1answer
31 views

Unexpected Token for Safe Navigation Syntax

I have some code like: if(s.Primary_Filter_Values__c?.containsIgnoreCase(billingState) || s.Primary_Filter_Values__c?.containsIgnoreCase(billingCountry)) {} VS Code is throwing me an unexpected token ...
0
votes
2answers
133 views

Retrieve Source in Manifest Not pulling in from Trailhead Org

I have a new trailhead org. I have used the SFDX to Create Project with Manifest option. This generated the following XML. I have set the trailhead as the Default org and authorized it. When I right ...
2
votes
1answer
36 views

Visual Studio Code Prettier plugin for Apex not formatting VisualForce [closed]

I've been using VSC for ages now and have had the apex Prettier plugin installed and working, but it is no longer formatting my Visualforce pages (it's still doing it for apex classes). I now get this ...
13
votes
5answers
22k views

No Option for “SFDX:Authorize an Org” command in VS Code Command Palette

I have performed below steps- Install CLI Install extensions "Salesforce Extension Pack" and "Saleforce CLI Itegration" I am getting only few SFDX command options in Command Palette. Also i have ...
0
votes
0answers
57 views

SFDX: Retrieve This Source from Org Not Deploy Metadata

I am using VS Code and did the below steps: Ran the command 'SFDX: Create Project with Manifest'. Ran the command 'SFDX: Authorize an Org' and authorized the org. Right-clicked the package.xml file ...
1
vote
1answer
19 views

Visual Studio Code Apex Replay Debugger Unsupported Java Error

I'm trying to use the Apex Replay Debugger on VSCode on an Apple MacPro (Big Sur) but get a 'Unsupported Java version'error. I have followed all the instructions https://developer.salesforce.com/...
0
votes
1answer
362 views

Error trying to authorize dev org for trailheads and vscode

Not sure what's going on here but I'm following the following trailhead and trying to authorize my dev org for use with vs code: https://trailhead.salesforce.com/en/content/learn/projects/quick-start-...
1
vote
1answer
35 views

'SFDX: Retrieve Source in Mainfest from Org' not retrieving the components

In VS Code, I performed these steps: Ran the command 'SFDX: Create Project with Manifest'. Ran the command 'SFDX: Authorize an Org' and authorized the org. Right-clicked the package.xml file and ...
3
votes
3answers
274 views

How do you run a test suite from Visual Studio Code?

How do you execute and get the results for a test suite from Visual Studio Code? Currently, whenever I want to run one, I have to go into the org, and then log into the developer console. It works, ...
0
votes
1answer
11 views

What values to put into npm init when following workaround instructions to get eslint working in sfdx project?

I'm experiencing the same problem as the poser of this question: Why is ESLint not working properly for Lightning Web Components in VS Code and how to make it work? One of the steps is to run npm init ...
1
vote
1answer
32 views

Can't connect cloned repo to sandbox in VS Code

I'm using VS Code, Bitbucket, and a standard sandbox (not scratch org).  What's the correct procedure to clone an existing repository and connect it to the sandbox? I've read this question/answer but ...
1
vote
2answers
146 views

prettier-plugin-apex vscode printWidth not working

Started using prettier-plugin-apex and by default the printWidth is 80, I changed it to 120, but it still defaults to 80. Changed at both user and workspace level. I see this ( "prettier.": 120,) ...
5
votes
3answers
13k views

Unable to Retrieve Source from Sandbox

From the VSCode console, I have created a new project with the command: sfdx force:project:create -n Integration --manifest I then authorized a sandbox org with the command: sfdx force:auth:web:...
0
votes
0answers
75 views

Error: INVALID_SESSION_ID: Session expired or invalid

I have an error when I try to uploud the code from VSCode in Salesforce organization. The error is this : Error: INVALID_SESSION_ID: Session expired or invalid I have a lightning web component and I ...
0
votes
1answer
48 views

The ApexClass name was not found in the workspace VSCode

Today I started to work on apex test class file after retrieve the source from the Sandbox I realized that the name of file is wrong I deleted the file test and the -meta.xml but when I retrieve again ...
0
votes
2answers
747 views

Not able to Authorize an ORG in VS Code

I am trying to create project workspace using VS Code. I am using SFDX: Create Project with Manifest command. After executing, it is creating folder for my project with all default files in VS code. ...
2
votes
0answers
20 views

sfdx force:org:list hangs

When I run the following command in either the VS Code terminal window, or a Windows Command Prompt, it returns all of the orgs, but hangs: sfdx force:org:list Is there some other way I should be ...
4
votes
1answer
566 views

You can’t remove the following public properties because the component is part of a managed package

I am trying to push a JS file in a LWC Component and am unable to do so with this error lwc/boatMap/boatMap.js-meta.xml: You can’t remove the following public properties: boatId, because the component ...
3
votes
1answer
118 views

How do I best switch versions of sfdx and plugins?

When there are bugs in different versions of SFDX CLI and the Plugins: There is a need to switch to another version. But I find uninstalling and re-installing too time consuming. Often people post ...
2
votes
1answer
21 views

How to Re-Enable VS Code Errors

I'm experiencing a strange phenomenon in which errors (I believe compile errors) are no longer being picked up by the VS Code SFDX code. Normally when I run "SFDX: Deploy this source to org",...
0
votes
1answer
44 views

Why are my recordtypes not being updated, they are going into the wrong folder

I have a CLI situation whereby the recordtypes I make changes too are not being updated on a retrieve. I cannot find flaws in my process, I change the connected org correctly my XML has the fields, ...
1
vote
1answer
35 views

VSCodedx is no longer showing execute anonumous debug logs in the output panel

All of a sudden my vscode isn't showing the debug logs from execute anonymous in the output panel. Other messages show up in there such as when I deploy a source to org, Turn on apex debug log for the ...
1
vote
0answers
29 views

VS Code auto submit changes doesn't work for 1 file

The .js file for a lightning web component won't deploy to my org when I save the file in VS Code, but deploys fine if I right click in the file explorer and select Deploy Source to Org. The output ...
0
votes
0answers
44 views

Salesforce VS Code Issue

We are facing issue on my VS code every time its shows me The terminal process failed to launch: A native exception occurred during launch (Unable to start terminal process: CreateProcess failed). 2....
0
votes
1answer
25 views

Truncated logs in VSC, not showing all classes and uncovered lines

I don't know what has changed in the sfdx CLI but for some reason it now prints truncated logs in VSC + it shows a false message that the test ran successfully but they failed. To reproduce it, I open ...
27
votes
1answer
10k 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 ...
1
vote
9answers
19k views

Cannot connect a Salesforce org using Authorize an org in VS Code

Using VS Code, after I enter the command line "Authorize an org" I get redirected to Salesforce login and can successfully log in. However I then get the error "This site can't be reached" The URL ...
0
votes
0answers
18 views

Cant able to redirect dev hub( salesforce login) through vs code

When i try to open dev hub through Vs code in terminal. It redirects to login salesforce. After loggin saying that "the service and account specified in key.json do not match the version of the ...
1
vote
3answers
112 views

VSCode not showing success alert

I clicked on "Show Only in Status Bar" by mistake. Now when I successfully deploy Salesforce apex code in VSCode, I only get the first alert to show the deployment is running. But the second alert ...
0
votes
1answer
36 views

Visual Studio Code + WSL2 + Salesforce Extension Pack. Intellisense/code completion for Apex not working?

After the long break I currently back to Salesforce ecosystem and I'm trying to setup my development environment - Visual Studio Code with DX features (Salesforce CLI, Scratch Orgs etc.) and Windows ...
0
votes
0answers
17 views

Renamed components in Scratch Org and trying to retrieve them

I have created a custom object Named ExampleObject__c and Fields as "Field1__c", "Field2__c", "Field3__c" in my scratch org. and pulled this source from scratch org to ...
0
votes
0answers
41 views

Visual Studio Code, SFDXError with retrieve for Aura and LWC

since yesterday I started having an issue when I try to use the command SFDX:retrieve source from Org on Aura or LWC items. The command fails and I receive this error message: Also, I noticed that If ...
0
votes
0answers
19 views

Scratch Org Create Succeeded after timeout now how do I register org in my vscode from ScratchOrgInfo

So I issued a command to create a scratch org (based on a shape) and it took a long time to execute. In fact, it timed out. However the error code gave me the ID of my org to query for, e.g.: sfdx ...
2
votes
2answers
3k views

Getting error while retrieving Source from Salesforce Org using VS Code and Salesforce Extension Pack

I am getting this error while trying to fetch(retrieve) source from VS Code and SF Extension Pack. STR : Right click on sfdx-project-json -> click on Retreiev Source from Org. The file is present ...
1
vote
2answers
74 views

Make a copy of production org into another(mainly meta data)

Problem: To make an exact copy of the production org into another fresh production instance. Possible Solutions: I have thought of a few possible solutions, please let me know if there is any better ...
6
votes
1answer
139 views

VS Code extension no longer including line number in Apex test failure output

When I run Apex tests from VS Code (leveraging Salesforce CLI), I'm accustomed to the output telling me what line my tests failed on in the event of failure. I've noticed a recent change (just in the ...
3
votes
2answers
2k views

SFDX Question. Can source:status be used in sandboxes?

Quick question, can I use source:status on sandbox? I'm a sf developer and I am still learning how to use sfdx in org development model (since its the one we use) and was wondering if source:status ...
0
votes
0answers
18 views

Make debugger stop on exception

I work in Visual Studio Code with Replay Debugger. Is there a way to make Replay Debugger stop on "exception"? Otherwise it is very confusing and difficult to figure out if exception ...
1
vote
1answer
22 views

How to delete saved orged configurations in vs code

How can I delete the org configurations which are saved. They always appear when I try to authorize any org and want to remove some of them. Thanks
1
vote
2answers
3k 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 -> ...

1
2 3 4 5
7