question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete / IntelliSense not working

See original GitHub issue

Summary

Autocomplete / IntelliSense not working for Apex code. On both SObjects and built in Apex functions.

Steps To Reproduce:

  1. Open Salesforce project, with existing classes.
  2. Run sfdx sobject definitions refresh -u ORG_NAME
  3. Type something and wait for the autocomplete

Expected result

Should show autocomplete/IntelliSense or snippet suggestion

Actual result

No autocomplete suggestions.

Additional information

SObject definitions pull in nicely.

Screenshot_2

Autocomplete doesnt work so nicely.

Screenshot_1

Additional information VS Code Version: 1.44.2 SFDX CLI Version: 7.56.1-2773b53bf5 OS and version: Windows 10 Home, Version 1909 JAVA Version: jdk-11.0.7

Have tried using various environments, both sandboxes and scratch orgs. Projects have very few apex classes, or any other components.

Test Classes do work very nicely, and I have double checked my JAVA_HOME/JDK_HOME paths (in addition to adding "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\Java\\jdk-11.0.7", to preferences.

Apex Language Server output log

19:59:22.493 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types.
May 03, 2020 7:59:23 PM apex.jorje.parser.impl.BaseApexLexer dedupe
INFO: Deduped array ApexLexer.DFA22_transition. Found 7075527 shorts which is 13MB not including array overhead. Removed 6418975 shorts which is 12MB not counting array overhead. Took 12 ms.
19:59:26.822 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Patching standard library for System.Database.* methods
19:59:26.832 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Done patching standard library for System.Database.* methods
19:59:28.150 [ApexIndexer STARTING] INFO  a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types.
19:59:28.154 [Apex Prelude Service STARTING] INFO  a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types took 5659 ms.
19:59:38.908 [ApexIndexer STARTING] INFO  a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types took 10740 ms.

Other related issues https://github.com/forcedotcom/salesforcedx-vscode/issues/2095 https://github.com/forcedotcom/salesforcedx-vscode/issues/920 https://github.com/forcedotcom/salesforcedx-vscode/issues/935

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
gab95commented, Dec 9, 2020

autocomplete is not working on trigger files it works on certain variables but not work on other ones

image

image (it shows no suggestions)

(no errors on apex language server) vscode: 1.51.1 java: 11.0.9

2reactions
jerhewetcommented, May 26, 2020

Is there a work-around for this issue? Barring that, is there a specific version set (VSCode, SFDX) that I can install to get fully-functional autocomplete for Apex classes? For what it’s worth, I’m seeing the same logging output for the Apex Language Server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio IntelliSense Not Working? What To Do.
Visual Studio IntelliSense Stopped Working. What To Do? · Workaround #1: Restart Visual Studio · Workaround #2: Restart Your Machine · Workaround # ......
Read more >
IntelliSense not working in VS Code - The Windows Club
If IntelliSense is not working as it should on your Windows 11/10 PC, you can try restarting VS Code and this should solve...
Read more >
Visual Studio IntelliSense Not Working? Multiple Ways for You!
Reinstalling Visual Studio or Visual Studio Code is a good method to fix IntelliSense not working on Windows 11/10. Just go to uninstall...
Read more >
How To Solve IntelliSense Not Working In VS Code
Method 1: Reload The VS Code · Method 2: Check If IntelliSense Is Installed · Method 3: Restart And Update VS Code ·...
Read more >
Why does intellisense and code suggestion stop working ...
Click Tools->Options->Text Editor->All Languages->General · Uncheck "Auto list members" · Uncheck "Parameter information" · Check "Auto list members" (yes, the one ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found