I am using visual studio code for python programming and recently, the color of the syntax highlighting below some specific lines became darker.
This does not happen when the Python and Pylance extensions are not installed or when I comment out the from selenium import webdriver
line.
How can I solve this problem?
2
Answers
The dimming of the text means that the code cannot be accessed, you can add configuration in settings.json to turn off the dimming function.
Or turn it off only in the python language.
I came across the same issue. I could by chance figure out this. Check if you have incomplete code like
raise Exception('This is the error message.')
, this is the cause in my case. After adding ‘#’ in front of that line, all the codes following are as bright as above.