1 Attachment(s)
Strange red blocks in Editor window
Does anyone know what these strange red blocks mean on my scroll bar (in VS2019) ?
They aren't related to the source lines - i.e. if I scroll the text window, the blocks remain in the same positions; they don't move as I scroll. And I only ever see them if I load one particular source file - even if it's unedited and even if I close that file and re-open it... :confused:
Attachment 36051
Re: Strange red blocks in Editor window
They show you the places (the lines) where intellisense has found the errors.
Note that sometimes it sucks! ;)
You can switch to show only the build errors though.
Re: Strange red blocks in Editor window
Re: Strange red blocks in Editor window
Thanks Victor - I followed a few links and found some advice about finding the project's .vs folder and deleting the .suo file. Then there were other suggestions about deleting everything there except for the .suo file. But neither of them helped.
Eventually I discovered that this particular source file has got its own .ipch file. I've no idea why - because the project must have well over 1,000 source files but only about 4 of them have their own .ipch file. Anyway - deleting the .ipch file has fixed the problem :thumb:
Re: Strange red blocks in Editor window
Glad you've solved this problem! :thumb:;)
Re: Strange red blocks in Editor window
What I seem to get now (with some files) is grey blocks rather than the red ones. I assumed maybe they'd indicate warnings, rather than errors... But what's weird is that if I compile just that particular file, it doesn't give me any warnings, or errors or even messages - just the grey blocks for some reason :confused:
Re: Strange red blocks in Editor window
Yes, there are some "low level important" warnings like not initialized arrays, suggestions to to use constexpr instead of #define and so on...
Re: Strange red blocks in Editor window
Have you tried installing the Intellisense Extender as an extension? It provides additional info re potential code issues.
Re: Strange red blocks in Editor window
Quote:
Originally Posted by
2kaud
Have you tried installing the Intellisense Extender as an extension? It provides additional info re potential code issues.
I didn't.
Re: Strange red blocks in Editor window
Me neither. What's weird is that the blocks don't seem to correspond to specific lines. So if I scroll the Editor window, the blocks remain in their initial positions. And even if I close the project then delete the .ipch file, then re-open and re-compile, the blocks come back in the same positions (even though the Editor window is now showing different text).
1 Attachment(s)
Re: Strange red blocks in Editor window
Quote:
Originally Posted by
John E
Me neither. What's weird is that the blocks don't seem to correspond to specific lines. So if I scroll the Editor window, the blocks remain in their initial positions. And even if I close the project then delete the .ipch file, then re-open and re-compile, the blocks come back in the same positions (even though the Editor window is now showing different text).
I agree, it's not so easy to find out where exactly the problem is.
You have to find such a grey dashed underline:
Attachment 36052
and see its tooltip.
Re: Strange red blocks in Editor window
Wow - well spotted! For the most part, my messages (mostly with red lines) are saying incomplete type is not allowed
And yet these don't seem to be programming errors AFAICT. They're statements which are annoying intellisense for some reason.
In fact, the vast majority of c'tors and d'tors give me the above error - but only in the affected source files which are just a tiny number of the overall sources. :confused:
Re: Strange red blocks in Editor window
VictorN - what tool did you use to make your screenshot? I've tried Snipping Tool and also Snip & Sketch - but if I try to use them while there's a popup on-screen, the popup always disappears :mad:
Re: Strange red blocks in Editor window
John, I usually use Win + Shift + S (I don't know how it is called! :D )
Re: Strange red blocks in Editor window
Quote:
Originally Posted by
VictorN
John, I usually use Win + Shift + S (I don't know how it is called! :D )
Ah yes, that's Snip & Sketch. It does work here if I'm very careful...
So how do you get those very neat red highlights? I can use the pen tool here but it's not exactly neat... :(