If it helps, this is how I solved it:
- Shift + Ctrl + P
- Type
Java: Clean Java Language Server Workspaceand select it - Reload VS Code
Videos
EDIT: SOLVED! ESLint was the culprit. The particular project I was working on could not find an eslint.js config file anywhere and this was causing the squiggles to disappear. A fix was to do eslint --init at my project root, or create an eslint.js file at my $HOME.
Please help, this is driving me crazy! VSCode has ALWAYS shown squiggly red lines on undeclared variables and other JS errors.
In the example below, I expect a squiggly because marie is not defined:
let johnny = 'man'; johnny = 'papa'; marie = 'mama'; // VSCode should see error here
I have tried a full uninstall of VSCode including all the extensions and folders systemwide. I have erased everything in settings.json too, but no luck.
Lastly I should mention that an error like let return; does get highlighted.
Apologies if this is a "stupid" question but I have spent some hours researching and trying solutions on this and came up short.
Until 2 days earlier, vs code was working fine, it was showing me all warnings and compile time errors if I made one with those squiggly yellow and red lines. But since yesterday, for some unknown reason, it has stopped showing them. I checked for the intellisense, but it's working fine, as it's showing me all the suggestions for code and keywords etc. but not for the warnings & errors. I tried restarting it quite a few times, but the issue still remains. Any kind of help will be appreciated, thanks!
Nobody answered your question so far.
What does work is:
{
"problems.visibility": false
}
in your settings.json.
You can also go into the preferences GUI and search for Problems: Visibility.
This is very helpful when working e.g. with partially decompiled APKs.
open your preferences file and add this
"java.validate.enable": false
I didn't try it for java, but it works for typescript.