If it helps, this is how I solved it:

  1. Shift + Ctrl + P
  2. Type Java: Clean Java Language Server Workspace and select it
  3. Reload VS Code
Answer from chris on Stack Overflow
🌐
Chief Delphi
chiefdelphi.com › technical › java
VS Code not underlining errors Java - Java - Chief Delphi
February 16, 2019 - I’m trying to use vs code, but it refuses to show errors. That is an example where it shows zero errors for clearly broken code. This not only stops me from catching obvious problems (48 stupid errors on compile), but it is stopping me from correctly importing because it doesn’t auto import.
🌐
GitHub
github.com › microsoft › vscode › issues › 226430
VSCode not highlighting errors in Java · Issue #226430 · microsoft/vscode
VSCode not highlighting errors in Java#226430 · Copy link · eduardo-de-bastiani · opened · on Aug 23, 2024 · Issue body actions · Type: Bug · //this error is not highlighted · banana = lenght().size(); VS Code version: Code 1.92.2 (fee1edb, 2024-08-14T17:29:30.058Z) OS version: Linux x64 6.8.0-40-generic Modes: System Info ·
Author   microsoft
🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 1100
Syntax Highlighting doesn't work · Issue #1100 · redhat-developer/vscode-java
October 16, 2019 - [VS Code syntax highlighting does not work for Java files] Environment Operating System: WIndows 10 JDK version: 1.8.0_151 Visual Studio Code version: 1.39.2 Java extension version: 0.47 Steps To Reproduce Install Java Pack Extension Pac...
Author   redhat-developer
🌐
GitHub
github.com › microsoft › vscode-java-pack › issues › 539
Java compiler no longer highlighting errors · Issue #539 · microsoft/vscode-java-pack
February 4, 2021 - Issue Type: Bug Hi, Error reporting suddenly stopped working for Java. No intelliSense and "Quick fix" doesn't work. Extension version: 0.12.1 VS Code version: Code 1.52.1 (ea3859d4ba...
Author   microsoft
🌐
Reddit
reddit.com › r/vscode › vscode stopped highlighting errors in my files
r/vscode on Reddit: VSCode stopped highlighting errors in my files
May 26, 2020 -

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.

🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 2720
the errors and warnings are not underlined · Issue #2720 · redhat-developer/vscode-java
October 5, 2022 - open .java file in vscode · make a syntax error or warning · [Please attach a sample project reproducing the error] Please attach logs · the errors and warnings are not underlined · the errors and warnings are underlined · screenshot · Reactions are currently unavailable ·
Author   redhat-developer
Find elsewhere
🌐
Reddit
reddit.com › r/vscode › vs code not showing warnings or errors for java
r/vscode on Reddit: vs code not showing warnings or errors for Java
April 14, 2022 -

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!

🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 1185
Visual Studio Code's Java Compiler Not Showing Certain Errors · Issue #1185 · redhat-developer/vscode-java
December 9, 2019 - If I want to see the error message then I have to read the class file in order to determine what the error is and what line it is on. The bug will only occur if the data structure is declared as a class member.
Author   redhat-developer
🌐
Stack Overflow
stackoverflow.com › questions › 53032692 › vscode-debugger-does-not-highlight-errors-as-precise-as-eclipse-does-in-java
visual studio code - VSCode debugger does not highlight errors as precise as eclipse does in Java - Stack Overflow
October 28, 2018 - I really want to make Java programming within Vscode work and worthwhile and so far it looks pretty good, got all the recommended extensions up and running, however I figured that vsc is not highlighting errors like convert errors as nicely as eclipse does.
🌐
Stack Overflow
stackoverflow.com › questions › 79763567 › vscode-java-extensions-not-highlighting-errors
spring - VScode Java extensions not highlighting errors - Stack Overflow
VScode java extensions doesn´t highlight my code errors neither suggests imports: I have listed all the working extensions in my project. Extension Pack for Java and Language Support for Java are
🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 1597
Since July update cause java highlight break · Issue #1597 · redhat-developer/vscode-java
August 27, 2020 - I love to use VSC Java plugin but I had so much pain working with java now. Now the highlight is glitchy, it don't highlight properly when Semantic Highlight is turn on. Comment don't get highlighted :( I feel sad Also I would appreciate...
Author   redhat-developer
🌐
Medium
shweta-lodha.medium.com › highlighting-errors-and-warnings-in-vs-code-5078b9313ea3
Highlighting Errors And Warnings In VS Code Without Clicking Anywhere | by Shweta Lodha | Medium
May 24, 2022 - Highlighting Errors And Warnings In VS Code Without Clicking Anywhere While doing development, it is quite obvious that you will see some errors and warnings. If errors and warnings are less, then it …
🌐
CodingTechRoom
codingtechroom.com › question › disable-java-error-highlighting-vscode
How to Disable Error Highlighting for Java Code in Visual Studio Code - CodingTechRoom
Alternatively, you can also set up workspace-specific settings if you wish to disable error highlighting for a specific project only. In your workspace, open `.vscode/settings.json` and add the line: `{ "java.errors.enable": false }`. Mistake: Not saving changes in settings after disabling error highlighting.
🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 1423
Highlighting is incorrect after imports are automatically inserted · Issue #1423 · redhat-developer/vscode-java
April 30, 2020 - redhat-developer / vscode-java Public · Notifications · You must be signed in to change notification settings · Fork 494 · Star 2.2k · New issueCopy link · New issueCopy link · Closed · Closed · Highlighting is incorrect after imports are automatically inserted#1423 ·
Author   redhat-developer
🌐
Reddit
reddit.com › r/vscode › no syntax highlighting for java
No Syntax Highlighting for Java : r/vscode
September 8, 2022 - Does restarting fix the problem? maybe try Ctrl+Shift+P --> Java:Clean Java language Server Workspace