Session Manager for Visual StudioYour favorite files and contexts under your fingertips. Safely store and switch between documents sets in seconds using simple JSON files 🔥 Save progress on tasks easily! ContextKeeper is a modern replacement for Save All Tabs extension. 💫 Automatically switch contexts when changing Git branches and check article about it. 💡 ContextKeeper is currently in the Open Beta, if you will find any issues please report them. Are you use using Favorite Documents, Workspace Manager or Task Canvas? Check how much value ContextKeeper delivers when compared to them. Looking for ARM-compatible build or VS 2019/2017/2015 support? Download from here. The supported context is made by:
Join the revolution and install it today! Save at least 3300 minutes/year = 55 hours = 2.3 days (15 mins x 20 days x 11 months). You need about 15 minutes to fully switch between contexts at the best possible scenario. In worst case scenarios switching to detailed context could take several hours, one of the real horror stories: "Losing this functionality interrupts my workflow beyond imagination. The opened documents represent a "bookmark" for me and I'm barely able to pick up work again without them. Every time this happens (...) I am willing to put hours into finding a solution, because the thought of losing my opened document state once more after a work session is terrifying. But this time around (...) nothing of the usual remedies helps (...) This has added another 20 Minutes and counting to my two hours put into solving this." With ContextKeeper you could safely store and switch between different programming contexts in seconds 🔥 All opened files, pinned tabs, documents positions and state (horizontal/vertical orientation, docked state and files order), breakpoints and bookmarks are preserved in a simple JSON file 😍 No more dealing with broken .suo file again. After installing VSIX package you could access your latest Mental Snapshots by navigating to View -> Other Windows -> Mental SnapshotsBy default tool window will open next to Solution Explorer Tool You could create a new snapshot using Create Snapshot button and restore them quickly using few commands from right-click context menu
Automatic snapshot switching when changing branchesWhen switching to another git branch ContextKeeper will automatically remember current branch snapshot and save it to .contextkeeper/.git-branches folder. Also it will be added to the "Mental Snapshots" UI list at the very top with prefix: This is the same process that you could do manually before switching branches but now fully automated for your convenience 🔥. The current branch snapshot is always continuously auto-saved when you add, remove or change position of any document tab or window (with tabs). Also a git branch could be changed from CLI, Visual Studio or other third-party client and ContextKeeper will detect it auto-magically 🧙♂️ and restore snapshot for currently selected branch. Breakpoints and bookmarksGenerally, when a snapshot is created, breakpoints and bookmarks are saved only for the currently open files. This behavior differs from that of Visual Studio, which remembers all breakpoints and bookmarks across different sessions for all files. However, I believe that saving them only for open files is more practical. I remember countless examples of finding old breakpoints from days before that were no longer relevant because I was working on a different task. The second important thing is that when they are restored for a file, all old breakpoints or/and bookmarks are removed if there were any, but only for that file and nothing else. BreakpointsStandard and conditional breakpoints are currently supported. When breakpoint is disabled it will be still saved to a snapshot with Although the supported area is probably enough for about 90-95% of use cases, there are some limitations:
I will be looking for ways to support excluded areas, starting from “Hit Count” and combined conditions (e. g. Conditional Expression with Hit Count). Unfortunately not every breakpoint’s detail is easily exposed via API but I will be extensively digging in Visual Studio’s internals to cover more use cases. BookmarksBookmarks are stored using line numbers in a similar way to breakpoints. Visual Studio API for bookmarks is really limited; therefore, currently there is no support for:
I hope you will enjoy using new breakpoints & bookmarks support! Relative pathsThe feature was one of the missing puzzle pieces, that I always wanted to include. Adding support for relative path is essential part to allow sharing your context between different dev environments and also inside your team. It will unlock potential to e. g.:
Every time a new snapshot is created it will include
Selected and active documents in tab groupsThere can be multiple tab groups opened at once and single document selected in each: The state of both selected documents is now preserved using Additionally, support for the active tab was added. When a document has focus while generating the snapshot, it will be tagged internally using Create stash snapshot and restore it laterThere are two additional commands in the toolbar. Stash and unstash. The idea is from git workflow but here it's applied to a current context you're working on. You could quickly save it (stash) and switch to something else that needs an urgent attention. After stashing a snapshot all tabs will be closed automatically, similarly how stashing works in git - current context is cleared and ready for a new work. A stash snapshot is always displayed as a first on the list. Currently only single stash is supported but multiple stashes will be supported in the future. A stash has additional description, like " 2 hours ago", to get you additional awareness how long it's awaiting to be unstashed. It's really easy to lose track of time, during coding session, and it will act as an useful reminder how long your "main" task was put on hold. The stash timestamp description is live updated. If you decide that more meaningful name for stash snapshot is needed, you can simply rename it and it will become a regular snapshot. Keyboard shortcutsYou could assign your favorites keyboard shortcut combination for stash and unstash commands from the toolbar. There aren't default shortcuts assigned but I found useful to use:
Full screen windows supportThere is a support added to remember if windows is maximized during snapshot creation. No more problems with restoring maximized windows, especially during git branch switching 😍 Only maximized windows will have additional property serialized in a snapshot. Where the snapshots are stored?All snapshots are stored in the .contextkeeper folder which is created in the same folder where solution file (.sln) sits. A snapshot is saved using self explanatory JSON format. You could try changing different bits manually and later checking an impact it has during restoring process. Git worktree supportThe git worktree support, introduced in v1.3, allows even more streamlined context switching. If you sometimes clone entire repository when working on a feature I recommend checking git worktree. Long story short, working tree is like clean, cloned repository but better because:
How much value ContextKeeper delivers when compared to othersBelow, you'll find a table comparing extensions that work with VS 2022. I've included free extensions, with the exception of Task Canvas, which is a paid one. I've invested several hours testing Favorite Documents, Workspace Manager, and Task Canvas to get a clearer picture of how they all stack up against ContextKeeper.
Task CanvasI must say, I'm a bit surprised by how Task Canvas, the only paid competitor, performed in the comparison. It was built with a different workflow in mind, which is why it lacks in certain areas. However, it's still quite powerful and presents an interesting concept with its independent task canvas (separate, physical tab). Kudos to Sergey for trying something different. I'll take a closer look to see if there are any elements from this concept that could add additional value to ContextKeeper. What are your thoughts on this? Favorite DocumentsIt appears that the most popular extension is based on the simple VS API - Workspace ManagerThe spiritual successor to the (broken) approach of Save All the Tabs, utilizing the The fail of the Save All the Tabs extension, to deliver a stable and reliable restore mechanism, really push me to work on the a truly independent session restore engine. I distinctly recall my thought process during that time -
Later, the context engine has become the heart of ContextKeeper. It was entirely written from scratch, and it is fully independent from Visual Studio session restore API. It is rock solid, and works in VS 2022, including olders versions VS 2019/2017/2015. It has taken thousands of hours and years of work to bring it to a state where it is a true pleasure and an enjoyable experience to use, and to have the session manager that Visual Studio has always deserved. 🚀 Cause there ain't room for more than one King 👑 in this town. Current limitations
The Roadmap includes among others:
|