A core feature of Visual Studio that allows developers to inspect, analyze, and troubleshoot code during execution.
In Visual Studio, red squiggles and IntelliSense come from the code editor’s analyzer and IntelliSense engine. When they disappear, the issue is usually with editor features being disabled or overridden.
Try these steps in Visual Studio 2022 (even when working with Unity projects):
- Verify squiggles and Quick Actions are enabled
- Squiggles (wavy underlines) show errors and warnings as you type, and a light bulb offers Quick Actions to fix them.
- In Visual Studio, open Tools > Options.
- Go to Text Editor > C# (and All Languages if needed) and ensure options related to:
- Error reporting / “Underline errors in the editor”
- “Show live semantic errors” are enabled.
- Squiggles should appear again for syntax and compiler errors, and the light bulb / screwdriver icons should show Quick Actions such as Add using or Generate method.
- Use Quick Actions to confirm the analyzer is working
- Intentionally reference an unresolved type (for example,
XmlReaderin a C# file) so that a red squiggle appears. - Place the caret on the type and press Ctrl+Period or click the light bulb.
- If the analyzer is working, options such as using System.Xml; or Generate class will appear and applying them should remove the red squiggle.
- Intentionally reference an unresolved type (for example,
- Check for extensions overriding IntelliSense
- IntelliCode and IntelliSense can be hidden or altered by extensions that replace the completion UI.
- Disable any completion/AI/autocomplete extensions temporarily:
- Go to Extensions > Manage Extensions.
- Disable extensions that provide their own completion lists or AI suggestions.
- Restart Visual Studio and test IntelliSense again.
- If IntelliSense suggestions (member lists after
.) and starred IntelliCode items reappear, re‑enable extensions one by one to find the culprit.
- Confirm IntelliSense features are active
- IntelliSense should show member lists, parameter info, and automatic code generation options (like Generate method, Generate property, Generate class, Add using).
- In Tools > Options > Text Editor > C#, ensure IntelliSense features are turned on (completion lists, parameter info, etc.).
- In the editor, type
variableName.and check that a member list appears; if it does, IntelliSense is functioning.
- If IntelliCode is specifically missing
- If IntelliCode “starred” suggestions are not visible even when IntelliSense lists appear, an extension may be overriding the UI.
- After disabling such extensions, if IntelliCode still does not show, use Help > Send Feedback > Report a Problem and mention IntelliCode.
These steps restore the standard Visual Studio behavior: red/green squiggles for errors and warnings, Quick Actions via the light bulb, and IntelliSense/IntelliCode completion lists and automatic code generation, even when editing Unity projects.
References: