Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code Intelephense Clear Cache and Reload

I use Visual Studio Code with Intelephense, and this works wonders on all of my projects except for one, where every class is shown as undefined until I open the file that contains the class. Therefore I have a suspicion that Intelephense is not scanning this project.

Some suggestions around the web mention to perform a "Clear Cache and Reload", however I cannot find this option anywhere. Can anyone show me where I can locate this, please?

I am using Windows 10, VS Code 1.46.1, and Intelephense 1.4.1

like image 532
Smithee Avatar asked Jun 26 '20 11:06

Smithee


People also ask

Where is reload button in VS code?

During a debug session, clicking the Restart button on the Debug Toolbar, or pressing Ctrl + Shift + F5 ( Cmd + Shift + F5 on macOS) performs a hot reload. Keyboard mappings can be changed by executing the Open Keyboard Shortcuts command from the Command Palette.

How do I fix code in VS code?

Clicking on the Code Action lightbulb or using the Quick Fix command Ctrl+. will display Quick Fixes and refactorings. If you'd just like to see refactorings without Quick Fixes, you can use the Refactor command (Ctrl+Shift+R).

What is intelephense in Visual Studio Code?

PHP code intelligence for Visual Studio Code. Intelephense is a high performance PHP language server packed full of essential features for productive PHP development. Fast camel/underscore case code completion (IntelliSense) for document, workspace and built-in symbols and keywords with automatic addition of use declarations.

What is intelephense PHP server?

Intelephense. PHP code intelligence for Visual Studio Code. Intelephense is a high performance PHP language server packed full of essential features for productive PHP development. Fast camel/underscore case code completion (IntelliSense). Offering detailed suggestions for document, workspace and built-in symbols and keywords.

How to clear Cache folder in Visual Studio Code?

This video explained to clear cache folder to get the better performance during the development activities in salesforce or any other platform using Visual Studio Code. Step 3: Select your User Account folder, make sure check the hidden folders and AppData -> Roaming -> Code -> Remove the cached files

What is IntelliSense in VS Code?

IntelliSense features. VS Code IntelliSense features are powered by a language service. A language service provides intelligent code completions based on language semantics and an analysis of your source code. If a language service knows possible completions, the IntelliSense suggestions will pop up as you type.


Video Answer


1 Answers

It appears to have been removed in version 1.0.0 (2019-02-20), as referenced in their change log in GitHub, in favour for "Index workspace". This can be activated by opening the command pallet (Ctrl + Shift + P) and typing "Intelephense: Index workspace".

However this did not resolve the indexing issue. This was in fact caused by a problematic symlink that somehow was linked to itself. When I have removed it and restarted VS Code, the indexing worked as expected.

like image 122
Smithee Avatar answered Oct 26 '22 16:10

Smithee