VsShowChars is an extension for viewing character sequences which are otherwise hidden by the editor. In normal situations there is no reason to see these as they aren't a part of typical developement. But when working with cross platform code or developing editor extensions these hidden values can be indications of bugs or bad merges. Seeing these characters becomes critical to tracking down the underlying issue. This extension adds two new commands to Edit -> Advanced
View Control Characters Control characters are non-printable values which represent text formatting or commands in the ASCII range of [0-31]. They are non-printable hence the editor ignores them during text rendering. Text processing programs like compilers however do process them as non-whitespace values. This can lead to programs which visually appear to be correct but result in odd compilation errors. Consider the following: A simple "hello world" program that all developers would agree is correct. However when this text is compiled the following errors are produced: The errors and their location (on the static keyword) on the surfce make no sense. What is happening here is there are a series of non-printable characters in front of the static keyword which are being processed by the compiler. This extension makes these control characters extremely visible by invoking the "View Control Chars" menu item. Ah now the problem is obvious. A pair of (char)2 values appear just before the static keyword. These are the source of the compilation errors. View New Lines Another subtle issue which can come up in cross platform / editor extension work is incorrect newlines. It is possible to end up with a file that has mixed new lines or simply the incorrect values for new lines. The editor will render all new line combinations the same way (as a new line) and give no visual indication as to what kind of new line was present. The "View New Lines" command adds an adornment for all new lines displaying exactly what character sequence is in play here.
|