You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Damatov edited this page Sep 10, 2025
·
3 revisions
Highlight invocations of conditional methods and attributes
The purpose is to give a visual impression that the code is not called under any condition.
Currently, the ReSharper highlights the Debug.Assert invocations if the current build settings are RELEASE. However, for DEBUG builds there are no special "highlighting mode".
What should be highlighted:
Method invocations if the method has the [Conditional] annotation. e.g. Debug.Assert(...).
Attribute usages if the attribute class has the [Conditional] annotation, e.g. [SuppressMessage].
Note
Conditional methods become always highlighted, e.g.
if the current configuration is RELEASE:
the Debug.Assert statements are highlighted by ReSharper with the message "Method invocation is skipped. Compiler will not generate method invocation because the method is conditional...".
if the current configuration is DEBUG:
the Debug.Assert statements are highlighted by this extension with the message "Method invocation will be skipped if the 'DEBUG' condition is not defined."
Note
The analyzer can be configured or deactivated in the ReSharper Options or Rider Settings dialog.