Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lesson 7: Error Highlighting extension used in VSCode? #312

Answered by PatrickAlphaC
OmerHefets asked this question in Q&A
Discussion options

Hi everyone!

I've noticed that in lesson 7, when Patrick refactors the FundMe contract in the "Solidity Style Guide" section, each time an error occurs in the contract (e.g. when a variable name changes and isn't recognized anymore by the compiler), the filename color changes to red and the error in the contract is highlighted in red as well. Yet this feature does not seem to exist in my local environment.

For example, at 11:02:50:

  1. Patrick changes the error name from NotOwner to FundMe__NotOwner
  2. The Error revertion in the contract is no longer valid, and is being highlighted in red

Error Highlighting example

I've searched online and I've found a few solidity error highlighter extensions for VSCode (e.g. Juan's popular solidity extension has an error highlighting feature), but I was wondering if anyone knows what's being used in this course and if it was configured somewhere in the first lessons. I don't want to download any random extensions so that my environment won't break later on.

Thanks in advance and happy coding!

Omer

You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
Comment options

Yes, I've downloaded this extension as was recommended in the course.

TL;DR: Error highlighting exists in the "Solidity + Hardhat" extension. The problem is probably in VSCode / the extension itself and disabling the extension and then restarting VSCode and enabling it again solved the issue for me.


I've done some more digging on the subject and on this specific extension as well, and it is indeed supposed to help with inline code validations:

Diagnostics

After figuring that it should work with this extension, I was able to solve this problem by disabling the "Solidity + Hardhat" extension and then restarting VSCode and enabling it again.

Yet it seems that the problem will happen again each time I restart my computer. I guess reinstalling or updating VSCode might solve this issue, but either way it should relate to this specific extension / VSCode itself / my own system.

Hope this will help someone anytime in the future.

Thank you Patrick for your answer and for this excellent course!

Omer

Comment options

Perfect!

Answer selected by PatrickAlphaC
Comment options

I have the same problem though I installed the solidity+hardhat extension. My vscode is unable to identify the sol language.
Screenshot 2025年09月30日 190628

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /