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
0answers
35 views

VS Code : Get Apex Debug Logs : Not getting the latest debug logs

I started using Apex Replay Debbuger last weeks. It was working fine. But suddenly it stopped working as the latest debug logs are not showing you in the VS code. I tried all possiblities of re ...
7
votes
3answers
2k 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
147 views

Format apex code in VS code

I have been using uncrustify to format apex code for quite some time and its been working as expected other then formatting soql queries but from past few days if I press alt + shift + F it doesn't ...
1
vote
1answer
180 views

Error While creating a Project on VSCode

I have installed Salesforce CLI and then tried to create a Project in VSCode using SFDX: Create Project. But facing the following error. Do I need to install any additional package? ERROR:Cannot ...
0
votes
0answers
21 views

Debug Warnings in VSCode

A coworker gets warnings while editing JS files (e.g. misspelling variable names, missing semicolons, missing closing brackets or parentheses...). That doesn't happen on my VSCode. I don't see ...
17
votes
1answer
5k 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 ...
4
votes
3answers
8k 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:...
1
vote
5answers
7k 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
1answer
37 views

Delete classes/trigger from Prod via VSCode

I need to delete classes and a trigger from prod via VSCode. I have retrieved the according classes/trigger via package.xml into VSCode. There is the command "SFDX: Delete This from Project and Org", ...
2
votes
1answer
339 views

sfdx force:source:push command failed. Source conflict(s) detected

Run following command: sfdx force:source:push Following error has been received: ERROR: We couldn't complete the push operation due to conflicts. Verify th at you want to keep the local ...
5
votes
1answer
55 views

Binding SFDX Commands to VS Code

There are SFDX commands that I would like to bind to a key combo in VS Command but I'm unsure how I would do this. For example, rather then using the CMD+SHFT+P to run SFDX: Execute Anonymous Apex ...
0
votes
0answers
45 views

VS Code Apex Error

I have the Salesforce VS Code Extension Pack installed, and I keep getting errors popping up in the Output tab on VS Code. It's very annoying and I can't get them to go away! Is there any way to fix ...
1
vote
2answers
420 views

Why is ESLint not working properly for Lightning Web Components in VS Code and how to make it work?

I'm trying to set up an environment to play around with LWCs. While doing a Analyze Your Code and Deploy It to Your Org unit from the Set Up Your Lightning Web Components Developer Tools module on ...
0
votes
1answer
227 views

VSCode overwrites changes without any warning

I am new to VSCode. I used the following to get all classes updated as per Org: sfdx force:source:retrieve -x src/package.xml After that I made some changes in a class in the deveoper console and ...
0
votes
1answer
31 views

Not able to authenticate my dev org from VS code

I am getting below error while I am trying to authenticate my dev org from VS code: { Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at ...
0
votes
0answers
60 views

MDAPI to DX Question

What I want to do is convert all the files in a particular folder in my project that are currently in mdapi format, convert them to source format, add the converted results to a corresponding folder ...
0
votes
1answer
24 views

Can't retrieve non-customizable CustomObject named: ContentDocument

I have made changes to the record page of content document object, now I need to push the record page to other org. tried to retrieve the contentdocument object from vscode editor but receiving "Can'...
5
votes
1answer
744 views

Salesforce DX Apex Debugging license issue

I'm trying to get Apex debugging working in VS Code, following instructions here. When I launch the debugger I see a popup You exceeded your licensed number of debugging sessions. Please end other ...
0
votes
1answer
194 views

Retrieve all profile metadata for comparison with vscode

Is it possible to retrieve all profile metadata (e.g. every custom object, field, page layout, record type, etc...) in vscode? I tried using the org browser and don't see a profiles folder. I ...
1
vote
0answers
36 views

How to Turn Off the Path Hover in VSCode File Explorer? [closed]

The file path popup that appears when you hover over filenames in the VSCode File Explorer is my least favorite feature of VSCode. If I'm scrolling through a list of file names to find something, ...
0
votes
1answer
32 views

Possible to code a component (Aura or LWC) and see it in local?

So far, while coding a component (Aura, or LWC), we need everytime to deploy to the org to see modifications, is there a way to code in my local machine ? (localhost like) ? In Angular for example ...
0
votes
0answers
26 views

whenever I try to deploy in VS Code it returns this error sf:UNKNOWN_EXCEPTION

sf:UNKNOWN_EXCEPTION: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1437374837-49598 (109636631) if I try the error a few more times, but ...
0
votes
0answers
181 views

ERROR_HTTP_414 - <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre> on VS Code

I am trying to push the code to my scratch org through VS Code using following command - sfdx force:source:push --json --loglevel fatal But getting following error on VS Code. ERROR_HTTP_414" - "...
0
votes
0answers
1k views

SFDX: Create Project failed to run

Facing problem to complete this trailhead trail ( https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/set-up-visual-studio-code) I have installed Salesforce ...
1
vote
0answers
67 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 ...
6
votes
1answer
721 views

Retrieving Metadata from Org using VS Code and CLI results:- MaxListenersExceededWarning: Possible EventEmitter memory leak detected

I am seeing a new warning message when retrieving metadata from VS Code. The metadata retrieval is successful but also getting below message. Steps to reproduce:- I have created a Lightning Web ...
1
vote
0answers
28 views

LWC eslint rule [closed]

I am in VSCODE and trying to set eslint rule for LWC using https://github.com/salesforce/eslint-plugin-lwc I am unable to set it up properly and lint rules are not firing. Can anybody help me here who ...
1
vote
1answer
154 views

How to download all Apex classes from Prod using VS code

Now that Force.com IDE plugin for eclipse is unsupportive, is there any way to connect to Prod org using VS code and download all Apex classes. I can see all extensions for SFDX but I do not know how ...
0
votes
0answers
86 views

sfdx force:auth:web:login freezes

When I try to authenticate to the org by going to "VSCode" and clicking on "No Default Org Set" then Select the environment and then I type alias name. The spinner comes at the bottom right of the "...
1
vote
2answers
133 views

Unable to authorize the org in vscode

When i tried to authorize the org via vscode this issue is showing.After killing process id 1717,another issue is showing.Here is the issue { Error: spawn cmd ENOENT at Process.ChildProcess....
5
votes
7answers
12k 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 ...
5
votes
5answers
8k 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 ...
1
vote
2answers
258 views

Download all objects and search validation rules only

I've recently setup vs code in hopes that I could easily download all validation rules and search across them for a string. We're updating our roles and role names are used in a lot of validation ...
0
votes
1answer
208 views

Unable to create scratch org successfully in Visual Studio Code

I have authorized dev hub org successfully and now trying to create default scratch org using visual studio code but getting following error: sfdx force:org:create -f config\project-scratch-def.json -...
4
votes
0answers
211 views

VS Code deploy: Maximum call stack size exceeded

I'm trying to deploy code in VS Code to an org. I'm getting the following error. The package.xml is valid, as far as I can tell. Starting SFDX: Deploy Source to Org 14:57:24.268 sfdx force:source:...
2
votes
1answer
151 views

Storing VSCode project in google drive? 100% cpu usage

I'm following the trailhead to try and setup vs code Salesforce extensions. Trailhead link After authenticating with my playground org and trying to create an apex class, I noticed it was running ...
1
vote
2answers
294 views

LWC without APEX: sfdx force:source:deploy into Production

I have a simple LWC component that is only made up of html, javascript, and css (no APEX). When deploying to production via vscode, I am confused on what I am suppose to be testing as I receive the "...
2
votes
2answers
238 views

Issue with SFDX: Authorize an Org

I am trying to create a Hello World Lightning Web Component as mentioned in the URL below. Hello World Lightning Web Component But in VS code I am getting below output. I did some analysis but unable ...
0
votes
1answer
267 views

VS code for Lightning Web Component

Suddenly started getting below error in my VS code while deploying components. Error: Parse error in file C:\Users\cccccr.sfdx\stash.json on line 1 FILE HAS NO CONTENT
-2
votes
1answer
49 views

Simplify Git bash CLI steps to commit the code to Github [closed]

I Would like simplify the below steps to commit code to Github. Please share any suggestions Step to Commit and Push code from local folder to repository through terminal. Move to Full retrieve ...
2
votes
2answers
288 views

Error parsing file: LWC Metadata Xml Parser: Unexpected element: runtimeNamespace

I am trying to deploy an LWC and get this error : "Error parsing file: LWC Metadata Xml Parser: Unexpected element: runtimeNamespace". Here is the code of my js-meta.xml <?xml version="1.0" ...
0
votes
0answers
23 views

Source Tracking in VS Code

I would like to Track Salesforce Source Code in Visual Studio. Already Installed & Configured Coding Tracker Extension into my VS Code.But I am unable to Track Source Code and facing "Can’t reach ...
0
votes
0answers
30 views

Type name already in use - Unable to use Rename Symbol command to correct Apex class name capitalisation

I use Apex PMD, one of the rules is: Class names should begin with an uppercase character (rule: Code Style-ClassNamingConventions) See: https://pmd.github.io/latest/pmd_rules_apex_codestyle.html#...
2
votes
1answer
551 views

F2 Rename Symbol in VSCode does not work with Apex

I am unable to get the Rename Symbol F2 command to work in VSCode when editing a Apex class. When I press F2 the floating input appears, once I press enter the code is not updated, and I cannot see ...
7
votes
0answers
221 views

Uncrustify with VS Code is overindenting SOQL Lines

I use VS Code and use Uncrustify to format the apex code As per this article. This was working fine for me until all of a sudden my SOQL lines are now automatically indented after the WHERE clause. ...
6
votes
1answer
312 views

LWC Folder Structure

Id there a way to organize my components inside sub folders and not having them saved directly under LWC? Just a simple example, if I have 10 components related to Contacts and another 10 related to ...
2
votes
3answers
1k 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
-2
votes
1answer
33 views

How I can retrieve DeployOptions with VS Code?

How i can retrieve DeployOptions metadata with VS Code and edit it? Or How I can deploy a class to Production without running any tests?
4
votes
1answer
528 views

Navigate to method definition in VSCode

I am new to VSCode. There is an Apex class like this: class MyClass1{ public static void someMethod(){ MyClass2.someMethod2(); } } Other class: MyClass2{ public static ...
6
votes
1answer
683 views

Lightning Component Indexing in VisualStudioCode hogs CPU and memory slowing my PC

I keep seeing "Indexing Lightning Components" in Visual Studio Code, which is a CPU and Memory hogging activity, slowing my PC. Is there a way to make it less CPU intensive?