Skip to content

Instantly share code, notes, and snippets.

@nicc777
Created July 2, 2021 05:15
Show Gist options
  • Save nicc777/913dc138003b6469fbd7938dd0d77644 to your computer and use it in GitHub Desktop.
Save nicc777/913dc138003b6469fbd7938dd0d77644 to your computer and use it in GitHub Desktop.
VSCode and lombok

Ran into a problem in VSCode recetnly with Lombok logging annotation causing a "log cannot be resolved" warning in VSCode.

Also, when running the project, as soon as that particular log.info line is hit, and exception is thrown.

First, I realized I didn't add the lombok plugin - so make sure that is installed.

I also opted to restart the Java language server when VSCode prompted me to do so.

Now, the log.info line was no longer "underlined" in VSCode, but the error still persisted... What was going on??

I stumbled on this stackoverflow post and tried running the "Java Clean" command from the command pallette. Note this requires "Language Support for Java(TM) by Red Hat" plugin - and this was the case as I previously installed the Java Language Pack as suggested in this documentation from VSCode.

After the IDE restart, everything worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment