ReSharper Help  

Error Highlighting

ReSharper automatically analyses your code while you type and can highlight a variety of possible syntax or logical errors. It can also detect and emphasize statements or constructions that you should be warned about (such as, for example, unused or uninitialized variables).

Errors

Red color in the editor is used to indicate errors. Undefined symbols detected by ReSharper are displayed in red color:

For other errors, the statement (or just the erroneous part of it) gets underlined with a red curly line:

You can use the Marker Bar to check whether your code contains errors and to navigate quickly to any of them.

Warnings

Statements or constructs that have warnings associated with them are emphasized with grayed text:

Warnings will be generated among others in the following circumstances:

It is always possible to switch off highlighting of specific warnings if you want so, or make ReSharper highlight them as errors instead.

You can use the Marker Bar to check whether your code contains warnings and to navigate quickly to any of them.

Getting information about errors and warnings

There are various ways to get an information about reasons ReSharper highlighted a given statement:

Tip   ReSharper features Quick-Fixes that can be applied to correct common programming mistakes. Please refer to the corresponding help topic.

Navigating between errors

Use the shortcut F2 (Shift + F2) or select ReSharper | Go To | Next Error (respectively, ReSharper | Go To | Previous Error) from the main menu to navigate to the next (respectively, previous) error found in your code.

Please refer to the corresponding help topic to learn more about Code Navigation in ReSharper.

Marker bar

The Marker Bar shows a colored stripe or "marker" for every warning and error in your code. Warning markers are orange, error markers are red. The position of a marker on the bar indicates the relative position of the corresponding error or warning in the file. You can get pop-up tips about the errors and warnings in your code by placing the mouse pointer over the corresponding markers, and you can navigate directly to the relevant lines of code by clicking on them.

 

Tip   It is normal so see many errors in the marker bar while your are working on a file. Many of these errors are eventually resolved as you complete the code. Should any errors remain when you feel your code is complete, it may be time-saving to visit and resolve the errors found before you try to compile your project.

The small box at the top of the Marker Bar is the file status indicator. It shows the overall error status of the current file.

Place the mouse pointer over the status indicator to display more analysis details:

See Also

Context Actions | Quick-Fixes | Advanced Editing Features