Track Active Item in Solution Explorer

Menu:  Tools -> Options -> Projects and Solutions –> General
Commands:  View.TrackActivityinSolutionExplorer
Versions:  2005,2008, 2010
Published:  3/29/2010
Code:  vstipProj0011


Note: Several people have asked if you can turn this feature on and off at will. You can if you bind the View.TrackActivityinSolutionExplorer command to a keyboard shortcut.


By default, VS2010 will track the current file you are editing in Solution Explorer.  It looks like this:




Notice that the current file being edited is also selected in Solution Explorer automatically.  This is a great way to keep track of where you are in the solution when you are working with a lot of files.  You can turn it off if you want.  Just go to Tools -> Options -> Projects and Solutions -> General -> "Track Active Item in Solution Explorer" and uncheck the option to turn this feature off.


Comments (18)

  1. FrankDeGroot says:

    I’ve missed that feature since VS 2008, even though it was sometimes annoying. Good to have the choice.

  2. Daniel Rose says:

    Although this sounds great in theory, it is almost completely useless in practice, so I quickly turn it off again.

    For example: I have a bunch of files open. I decide to close some of the files, since I do not need them open anymore. I click on one of the files (solution explorer jumps to the file), close it (solution explorer jumps to whatever file is next in the open-files-list), etc. Annoying.

    Even more problematic: I am looking for a file. I navigate to where I believe the file is located and open it. After opening it I see it is the wrong file (or alternatively after a small edit I want to change another file where I currently am). I close the file. Solution explorer jumps to the next file in the open-files-list, which can often be in a completely different location in the solution. So I have to find where I was before, etc.

    Eclipse solves this in a much better way, by having a toggle button for tracking the file on/off directly on the solution explorer.

    Luckily, there is also Resharper, which solves this problem by having a key binding for locating the current file in the solution explorer.

  3. zainnab says:

    Hey Daniel 🙂

    I think you are getting the tracking in Solution Explorer confused with the File Tab Channel actions.  The tracking in Solution Explorer isn’t proactive it only reacts to where you are at at any given time.  Kind of like a GPS that updates when you move.  The GPS can’t move you it just shows you where you currently are.

    When you close a file on the File Tab Channel in VS2008 it will jump to the far left-most tab in the list.  VS2010 will do this as well UNLESS you turn on the ability to insert documents to the right of existing tabs in Tools -> Options -> Environment -> Documents.  With this setting on it will jump to the far-right tab instead.

    Is that what you are referring to?

  4. MarcT says:

    I also turn this off because it leaves my Solution expanded all over the place as I open and close files from lots of projects throughout the day. Once there’s a right-click "Collapse everything below this project or folder", then this option becomes more useful. But I still haven’t found that command in VS 2010.

  5. zainnab says:

    ohh nice one MarcT.  There definitely SHOULD be something like that in Solution Explorer.  I’ll forward this feedback to the team.

  6. Daniel Rose says:

    Hi Zain,

    No, I’m getting nothing confused. I was trying to explain why the option which seems nice in theory fails in practice with any non-trivial solution size. Apparently my relatively short descriptions of why it doesn’t work weren’t enough.

    The problem is precisely this interaction between the file tab channel and the solution explorer when closing a file tab.

    When I close a file, Visual Studio automatically switches to some different file. If I have this option on, the solution explorer then jumps to this file. Most of the time (but not always), this isn’t where I want the solution explorer to be.

    So with Visual Studio, either I never close files, or I turn the option off. Luckily there’s Resharper, which fixes this by having the "Locate current file in Solution Explorer" shortcut.

    As an alternative, there’s also or

  7. zainnab says:

    Hey Daniel,

    Ahh.  I see what you are saying now.  Makes sense.


  8. LosManos says:


    @FrankDeGroot: I have this in my VS2008.  IIRC it was there in 2005 too.

    @ MarcT: Install DPack from  It gives you a shortcut for collapsing the whole solution tree.  One has to stand at the root though.  The whole shortcut then goes ctrl-alt-L home propertieskey E.  Probably mappable to a faster key if you want.  Dpack also gives you some other functionality which are a must-have IMHO.

    @zainab: The trackactiveitem sometimes stops working in my 2010.  It works for a while and then just quits.  Turning the feature off and on again doesn't help.  It looks like it has something to do with how the file was opened, through Gototdefinition or opening from Solutionexplorer or through Find.  Opening the already opened file in Solution explorer seems to do the trick.


  9. Anthony says:

    Is there any way to make it actually visible in the Solution Explorer?

    I only see a very subtle shade of grey if I look at the monitor from just the right angle.  Cool colours, but useless.  Cannot see a way to change.

  10. Rytis Usalis says:

    Hello, i missed this feature in VS 2008, thank you for solution.

  11. Jim Nicolet says:

    Is there a shortcut key / macro / right click option to collaspe the expanded list in  Solution explorer  in VS2010

  12. zainnab says:

    Tragically, no.  But the power tools do have this ability with Solution Navigator:…/d0d33361-18e2-46c0-8ff2-4adea1e34fef

  13. Pratik Chandra says:

    "Daniel Rose" has spoken exactly my mind. This feature is actually annoying for me too most of the time…so I don't want to enable/disable the global vs settings, but just like in resharper(I guess), I'd like to track/locate JUST the current file in the solution-explorer, through a shortcut. Is there a way to do that or any alternate tweak or something??? It would really help, and ofcourse save a lot of time too!!!

  14. Muhammad Zahid Iqbal says:

    Great, by default it should be checked, its pretty much annoying otherwise……………..

    As far as i remember, by default it was checked in VS 2005……….

  15. zainnab says:

    Well, it turns out you CAN bind this feature to a keyboard shortcut via the View.TrackActivityinSolutionExplorer command.  I've updated the post with the command in it for reference.

  16. David says:

    Daniel Rose,

    I had the same problem.  It was solved by deleting the .suo file.  A new one is created the next time you exit VS with your project loaded.  

  17. Hamed says:

    I think better solution is leave track active off and use (Ctrl + [ + S) for vs 2012+ (Using Ctrl + Alt + L for old versions)

  18. James says:

    I've always used this feature bound to a shortcut key.  I just have to tap the shortcut twice to activate the feature (which selects the current file) and then disable it again.

    Or I used to.  In VS2008 this worked like a charm.  In VS2012, I get a nonsense error message stating "The operation could not be completed" – even though it was.  And in VS2013, tracking can't locate files in projects which are collapsed, so it's next to useless.  VS2013 does have a SolutionExplorer.SyncWithActiveDocument command, but that too can't locate files in collapsed folder hierarchies.

    Suffice to say I don't have many hopes for VS2015 at this stage.

Skip to main content