开发者

Visualize error location in Visual Studio editor

I'm looking for a way to visualize compiler errors in Visual Studio.

I'm working in C# and have "Underline errors in the editor" turned on in C#'s advanced text editor options. However the underlines are not very noticeable, so it's hard to catch them when scrolling through the code.

During build I get a list of compiler errors, but it would be nice to see the errors before building.

Currently for example I have to remove a class variable. The variable was used in several places, I could quickly fix all errors before building if there was a better way to see where they were.

One way would be to show a red tick in the scroll bar, but I didn't find anything like that in the preferences.

Is th开发者_StackOverflowere a better way to see where the errors are in Visual Studio?


The Error List window should show you all the live semantic errors the IDE has found in the same way that it shows you errors the build found after a build.

The keyboard shortcut CTRL+SHIFT+F12 (which is View.NextError) should cycle through the errors in that list and should adjust the code editor window to focus on the problem line.


Simple. I use 2 extensions for that:

Error Lens (usernamehw.errorlens) for highlight the entire line and show on real time the error diagnostic

Error Gutters (igorsbitnev.error-gutters) for put error icons next of line number

Both look like this:

Visualize error location in Visual Studio editor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜