Troubleshooting issues

Apr 27, 2010 at 6:21 PM

Hey there, I've just installed your VS extension on VS2010 running on Windows 7 x64, but highlights just refuse to come up. The extension appears in the Extension Manager, it is enabled yet I see no additional items in the Fonts section.

Is there a way to enable logging? Alternatively, how do I debug it?


Apr 28, 2010 at 10:07 AM


I have developed the extension on a Windows7 x64 machine, so that shouldn't be the problem. Logging might be implemented in a future version.

Seems strange that you can't see the highlighterr fonts in the fonts and colours settings, they should all be named "Highlighterr Xxx" (where Xxx is the particular type). They should get added in as soon as the extension is installed, and they should remain after the extension is uninstalled (to remember previous values).

Did you try reinstall the extension? I guess it's possible that it didn't install properly. Also note that for me, whenever I install the release version, the first time I open VS, only the HLSL highlighting seems to work. After restarting VS, the C++ highlighting becomes active (still trying to figure out what causes that).

There are a couple of other reasons why the C++ highlighting could be inactive:

- If the current project is a CLI project. Unfortunately CLI isn't supported by the new intellisense, so probably nothing would be highlighted. I don't have a CLI project to test with at the moment, I probably should make one, just to verify those claims.

- If the solution doesn't have an SDF file (or it's not a VS2010 solution...), or if the SDF file can't be found for some reason. The latest version will popup a messagebox if it has a problem loading the SDF.

- If there was some other error creating the VC2010 objects (maybe the project isn't a VC2010 project - the latest version will popup a messagebox in this case).

If none of these things help, you can download the source and run it in debug mode. You'll need the Visual Studio 2010 SDK and Visual C# 2010 installed. Once the solution is open, you should be able to debug it just by hitting the run button. A good place to start troubleshooting the C++ highlighting would be in the constructor of the Intellisenser class, and the property IsActive on the Intellisenser (should get set in the constructor somewhere).


Hope this helps,


Apr 29, 2010 at 12:04 AM

Thank you for the prompt reply. A re-install put HighligherXxx items into the Fonts section and then a consecutive restart of the IDE added highlights to a tiny C++ test project generated by VS 2010 Pro. So far so good.

However, moving to a real .sln with about 20 C++ projects breaks the Highligher... As for debugging the issue - I am interested in multi-project support. Could you explain what the issue is?



Apr 29, 2010 at 9:45 AM

No worries, glad to hear you got it going.

Adding support for more than one project in the solution is on my to-do list, I'll probably get onto it this week sometime. Basically the reason why I haven't implemented it yet is because of laziness.. In fact i haven't even tested it on a multi-project solution yet :) ..So I'm actually kind of curious as to what it did in that situation (my guess is it should pick up all the identifiers from the first project which was added to the solution, but maybe only if that project had the same name as the solution).

Anyway, I'll create a new test solution soon and figure out what will need to be done. The main thing I don't know yet is the configuration of the SDF file(s) for a multi-project solution. At the moment it just loads an SDF in the same path and name as the solution file, which is probably the cause of most problems. There's probably some property in the project objects saying where the SDF file is, but it might take a bit of fiddling to find it. Also I'm assuming that the SDF files are created per-project by VS, even though they end up in the solution's directory. I really have to do some more research on the whole SDF subject, to be honest.

Apr 29, 2010 at 1:01 PM

Well, I took a look at it and found that in a multi-project solution, there's still only one SDF file, so it simplified adding the multi-project support. Let me know how the latest version works for you...

Apr 29, 2010 at 6:22 PM

The build from 2010-04-29 works very well, everything is highlighted. Thank you!

I've just noticed that openning source files got a little slower and there are spikes in CPU usage visible in Process Explorer...

Apr 30, 2010 at 9:52 AM


It probably does take a bit of CPU power to do the parsing, luckily VS is good with caching the results though, and doesn't query the classifier any more than it really needs to. The most CPU power will be used the first time a document in the solution is loaded (or, when the solution is loaded if previously documents were open), since that's when it reads all the data from the DB into its dictionaries. Parsing of subsequent files is a lot faster than the initial one, but it could probably have its performance increased. Also, a bit of CPU power will be used when typing, as new text has to be classified, and new identifiers need to get added into the dictionaries.

I've been meaning to do some research into lookup speeds of different types of dictionaries in C#... Since the dictionaries I'm using probably aren't the best choice. Will have a look into that sometime soon.

I haven't really experienced any performance issues while using it so far, with about 250,000 words in the dictionary for my main C++ project. But I do use a fairly fast PC, so I'm interested to know of any performance issues that anyone might come across. Can you give some more info on what causes the CPU spikes? ie. on opening file, or while typing, etc. Thanks!

Apr 30, 2010 at 6:52 PM

The spikes come when a new document is opened, just as you said. I'm using a dual-core notebook, so it's not that grunty...

Could you perhaps add some code to collect statistics on dictionary size and lookup performance? I would be happy to test any of your builds and email results.

May 1, 2010 at 5:13 AM

I'll see what I can come up with, I like the idea of having a statistics window that can bring up information about what's in the dictionary. It should also be possible to put some timing code in there to figure out average lookup times..

I've been meaning to figure out how to open up a dialog box from inside VS, as I need to have something similar also for the "rename" functionality I so desperately want to implement (hopefully it will end up with something similar to the C# Refactor>Rename functionality)...

May 1, 2010 at 2:29 PM

If you download the latest changeset from the source code, you can install the release build from in there. It contains a little statistics dialog you might find handy, it's useful for debugging also.

Sep 4, 2010 at 6:03 PM

I'm using VS 2010 Professional under Windows 7 64-bit.

If I copy & paste code from one file to another I find Highlighterr often seems to stop highlighting certain types. It seems to continue highlighting functions correctly but enums, macros and typdefs etc appear to lose their coloring.

Closing the solution and reloading does not restore thingsthings. Shutting down Visual Studio and reloading also doesn't seem to work. I've found the quickest way to get things working again is to go into Extension Manager, click on Highliterr's Disable button and then immediately click the Enable button to reenable it. Then when I shut down VS and open it back up the coloring is working again.

Sep 13, 2010 at 10:33 AM


I think you may have encountered the same bug that's been annoying me a bit lately, although I have never had to reinstall Highlighterr to fix the problem..

See if this helps - Open the Highlighterr stats dialog (from the right-click context menu item), and click the Rebuild Index button. For me it helps, but usually Highlighterr only gets confused when I copy paste for example an entire class definition, and then rename it in place. I think in that situation it's getting the "name removed" call from VS, and then removing that item out of the index.

I haven't had my version stop working altogether though (which sounds like what is happening). If you've found a reliable way of making the bug happen (so I can try reproduce it), that would help a lot in figuring out what's causing it.