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
1
vote
0answers
16 views

Retrieve source in manifest from Org

I'm trying to retrieve classes from my test org using package.xml. Recently the operation fails immediately with the following error; 10:35:14.995 Starting SFDX: Retrieve Source from Org Socket is ...
-1
votes
0answers
26 views

Increase the coverage rate for the test class AttachmentBO 73% of cover [duplicate]

I managed to get up to 73% but the lines that are in red below can't cover the code at all. I would like ideas or modifications to make this code acceptable to production. Can you help me? public ...
1
vote
1answer
36 views

diff on folder in visual studio code

I am using Visual Studio Code with Salesforce Extensions. I am trying to find all diffs between my local project and the sandbox. When I right click on classes folder and click on Diff Folder Against ...
0
votes
0answers
29 views

How to authenticate sandbox to VS Code with Multi-factor required

I am trying to authenticate my VS Code to one of my sandbox and when I am entering my credential into the salesforce UI it is literally doing nothing and when I am checking login history for my user, ...
0
votes
0answers
32 views

Cannot authorise a salesforce org in VS Code due to certificate error

I cannot authorise a salesforce org in VS Code. I am prompted to login, but then I get this error: ERROR running auth:web:login: Invalid client credentials. Verify the OAuth client secret and ID. ...
0
votes
2answers
854 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-...
4
votes
2answers
959 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 ...
0
votes
1answer
47 views

can we authorize vscode using session id? because i am not able to authorize , it gives error that no event found

Hi so i am trying to authorize the my org in vscode using the below documentation https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_existing_access_token.htm but ...
1
vote
0answers
18 views

Vscode authorisation taking long time

In vscode I was unable to authorise a org even I set Java path and salesforce cli path as well but still taking long time and tried plug-in as well can anyone help me to authorise an org
0
votes
1answer
32 views

Blue squiggly lines when using SLDS Validator extension in VS Code

I'm new to LWC and VS Code. I've installed the recommended salesforce extension package which has SLDS Validator in it. But in my html file, it is showing blue squiggly lines under the SLDS class ...
0
votes
2answers
1k 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. ...
1
vote
1answer
27 views

Updated Design Tokens with VSCode and SLDS Validator

Recently, I am getting slds validation errors in VS Code for 'presumably' updated design tokens for the aura component .cmp file. It is complaining that: slds-m-bottom_medium should be updated to ...
1
vote
0answers
29 views

How can I get VS Code to consider dynamic styles as valid CSS?

I'm building a Lightning Web Component with dynamic styles in VS Code. Each time I do, I get warnings and errors about empty rulesets and expected braces and selectors. <html-element style={...
42
votes
2answers
16k views

Two SFDX project folder structure questions

A default SFDX project is created with these folders: force-app/main/default force-app/test/default under which folders such as aura and classes and staticresources that contain components can be ...
0
votes
2answers
41 views

Solid metadata search and backup [duplicate]

I know this question has been posted before but wanted to revisit with a fresh set of eyes. So as you know, admins need to search an ENTIRE org's metadata for various reasons. For my use case, I need ...
1
vote
1answer
28 views

Is it possible to turn on the Apex Replay Debugger permanently or for the entire day from VSCode

Every time I use the VSCode command to turn on the Apex Replay Debugger, it expires in less than an hour, and then I have to re-run the command to turn it back on again. Is there a way to turn it on ...
0
votes
0answers
25 views

SFDX Plugging Debugging in VS Code

I'm working on a DX CLI plugin using VS Code. My work machine just upgraded my VS Code install to v 1.56.2. Previous version I had wouldn't even start the remote debugger. Now the remote debugger will ...
0
votes
1answer
30 views

Visual Studio not pulling managed package components

Seems like the latest VS Code version is not pulling managed package components to the workspace. I have it connected with my dev org that contains the managed package which I have released in ...
1
vote
1answer
299 views

Use Prettier in VS Code to format Visualforce

I'm struggling to get the Prettier for Apex (installed as per instructions here enter link description here) to format Visualforce Pages and Components. I have a vague memory of this working for me in ...
0
votes
0answers
28 views

Formatting Visualforce Pages in VSCode on Save

can someone confirm how to get prettier working with visualforce pages on save in VSCode? I have tried in a fresh project but it never works. Steps taken: SFDX: Create Project npm install SFD: Create ...
10
votes
3answers
5k 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 ...
2
votes
3answers
352 views

Project is not created after running SFDX: Create Project in VS Code

I have issue while creating a project using either SFDX: Create Project or SFDX: Create Project with Manifest command. I don't receive any error but the project is not created. The variable path is ...
0
votes
0answers
9 views

VS Code Authorize an Org while using remote SSH

I have a remote linux machine to which I am connecting via remote SSH in my VS Code. I use "Remote - SSH" VS code extension for the same. I could browse remote directory in my VS Code and do ...
0
votes
2answers
260 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
722 views

VSCODE for Salesforce Authorize org using session Id

I'm trying to Authorize my salesforce org to VSCODE using session Id as mentioned in the documentation. But it is not working. Can you please let me know what mistake I'm doing here. sfdx force:...
0
votes
0answers
69 views

Connect TIMEDOUT error Salesforce CLI while trying to open org

I am trying to authorize my org but i am facing an error below any idea why the error occurs and how to resolve Starting SFDX: Open Default Org 20:13:52.519 sfdx force:org:open Error: connect ...
0
votes
1answer
42 views

How to ignore SLDS token problems(Infos) in VSCODE?

I'm developing lwc in VSCODE, and today my editor suddenly shows a bunch of SLDS problems just like this it is annoying and I do not want to fix it by update the token to a new version or make a ...
0
votes
0answers
63 views

VSCode sfdx deploy error after authorizing: Error authenticating with the refresh token due to: expired access/refresh token. Able to retrieve

I'm experiencing an issue where I can authorize an org from VSCode, but can not deploy to the org. Interestingly enough, I can retrieve from the org - when I type in the command from the terminal, not ...
1
vote
2answers
5k 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 ...
0
votes
1answer
44 views

Error: 'read ECONNRESET' unable to retrieve components in vscode

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 ...
0
votes
1answer
27 views

Where to place eslintrc.json and jsconfing.json when we use multiple package directories?

Should I have signle jsconfing.json and eslintrc.json in sfdx project that is in fact monorepo or I need separate configurations for each directory/package? What are pros and cons of mentioned ...
0
votes
0answers
23 views

Not able to create Scratch Org in VS Code

I am trying to create a scratch org from VS code but it shows me an error. It says "connect ETIMEDOUT 101.53.168.237:443" I was able to do it correctly few days back - all of a sudden its ...
5
votes
8answers
22k views

Salesforce CLI is not installed - it ain't so

In VS Code. Go to command palette and enter 'Create Project with Manifest'. Prompted for a folder and get these messages: Starting SFDX: Create Project sfdx force:project:create --projectname ...
2
votes
1answer
577 views

Not seeing changes to LWC after deploying via VSCode

I have a SFDX Force-App that contains all of my classes, lightning web components, objects, triggers, etc. I've uploaded this force-app to my sandbox and my changes in my lwc was there and looked good ...
3
votes
1answer
441 views

Salesforce VScode retrieve from org “Cannot read property 'split' of undefined”

I was using the "Retrieve source in manifest from org" command for the resources in package.xml file. However when I executed the command it failed saying "Starting SFDX: Retrieve ...
13
votes
6answers
27k 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
40 views

Unverified Breakpoint: Apex Replay debugger not stopping at the break points in VS Code

I am experiencing an issue with the Apex Replay Debugger on my Mac. When I am trying to replay a log file in Apex Replay Debugger in VSCode, the debugger never stops at the specified break point. When ...
0
votes
3answers
43 views

Unable to retrieve workflow rule from case comment object

I have created a new workflow rule for Case Comment object. When trying to retrieve from org browser getting this error "Cannot read property 'split' of undefined" and when i tried to ...
0
votes
1answer
658 views

component.css-meta.xml File in LWC getting created when retrieved through VS Code

Due to some recent updates to Salesforce DX or VS Code, I am getting an extra meta.xml file for each Lightning web component which I am trying to retrieve from the source. For example, if my component ...
4
votes
5answers
13k views

how to open lwc without vscode salesforce

I mean If I can check the code (for lwc as js and html code) in salesforce without vscode. I can not see the code in developer console
1
vote
1answer
146 views

Local server connection Issue with Lightning Web Component in VS Code

I was trying to connect local server with the lightning web component in Vs code.I have written the following command in terminal sfdx plugins:install @salesforce/lwc-dev-server But I am getting this ...
1
vote
1answer
117 views

No Package.xml Found In Destructive MDAPI Deployment

I've already looked at the existing questions and made sure of the following: Only package.xml & destructiveChanges.xml are in the folder I'm trying to deploy. package.xml is empty outside of the ...
1
vote
1answer
38 views

How do I prevent developers from deploying directly to Devhub and instead push the code to sandbox?

I have a production org that is the Devhub. I have a full copy sandbox. I want that the developers that are working on their respective scratch orgs, don't deploy their changes to production directly. ...
2
votes
1answer
4k views

Java runtime could not be located” when starting VSCode with the Salesforce Extensions - Java Installed

I have followed the steps suggested on "Java runtime could not be located" when starting VSCode with the Salesforce Extensions. But now I still getting the following error " Code Editor ...
3
votes
2answers
4k 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 ...
0
votes
0answers
33 views

Running SFDX: Create a Default Scratch Org doesn't create a scratch org

When I run the command SFDX: Create a Default Scratch Org.. it doesn't creating the scratch org, the banner of the command is still there and the command prompt doesn't show any error. Any help would ...
0
votes
1answer
2k views

Error: Cannot find module '@salesforce/sfdx-lwc-jest/config' while testing my LWC from vs code

I have started my practice on LWC testing While i'm run this command:"npm run test:unit" i am getting this error:Cannot find module '@salesforce/sfdx-lwc-jest/config'. Error body is: Error: Cannot ...
16
votes
3answers
29k views

“Java runtime could not be located” when starting VSCode with the Salesforce Extensions

When starting VS Code (v1.21.1) with the VS Code extensions installed (v40.4) I'm getting the error message: Java runtime could not be located. Set one using the salesforcedx-vscode-apex.java.home ...
1
vote
0answers
31 views

How to write a meta data for an object (Standard Object and Custom Object )?

I want to create meta data file so that I can enable field history tracking and there is no need for manual enabling in sandbox. I want this metadata file to work with Jenkins pipeline. I have to do ...
1
vote
0answers
75 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: "...

1
2 3 4 5
8