I’m really happy and excited that finally the two biggest features, breakpoints and bookmarks, have finally been implemented and are now available the ContextKeeper version 1.95! 🎉🍾

Bookmarks, breakpoints, and relative paths (implemented in May 2022) were the big missing pieces from the 2022 roadmap that I always wanted to include as ContextKeeper’s cornerstones.

Not only are open files remembered, but so are their order, pinned and selected state, line and column position, document groups, window position, breakpoints, and bookmarks. And last but not least, you can seamlessly open them across different development environments (thanks to relative paths).

From the early days of ContextKeeper, I wanted to be sure that every released feature was of top quality and production-ready, despite the fact that we are still in the Private Beta 😄. Therefore, the polishing phase for breakpoints and bookmarks support has taken a lot longer than I had originally expected. Surprisingly, the bookmarks support was a lot more complex than I had initially thought based on the early December prototype.

Generally, 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.

Breakpoints

Standard and conditional breakpoints are currently supported. When breakpoint is disabled it will be still saved to a snapshot with IsEnabled property set to false and restored in a disabled state later in the Visual Studio. A single conditional expression is supported with two modes Is true and When changed

img

Although the supported area is probably enough for about 90-95% of use cases, there are some limitations:

  • only a single conditional expression,
  • no support for Hit Count or Filter expressions,
  • no support for Actions, “Remove breakpoint once” hit or “Only enable when the following breakpoint is hit” options.

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.

Bookmarks

Bookmarks are stored using line numbers in a similar way to breakpoints.

img

Visual Studio API for bookmarks is really limited; therefore, currently there is no support for:

  • named bookmarks - only the line number is stored but not the bookmark name,
  • folders - bookmarks folder structure is not restored.

I hope you will enjoy using new breakpoints & bookmarks support!