<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p" -->

---
title: Building Bookmark Studio: bookmarks that belong to the...
description: Mads Kristensen describes the architecture behind Bookmark Studio, a Visual Studio extension that upgrades built-in bookmarks into named, color-coded,...
canonical: https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building Bookmark Studio: bookmarks that belong to the codebase | daily.dev
og:description: Mads Kristensen describes the architecture behind Bookmark Studio, a Visual Studio extension that upgrades built-in bookmarks into named, color-coded,...
og:url: https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p
og:image: https://api.daily.dev/og/posts/ia7iSql1p.png
og:image:alt: Building Bookmark Studio: bookmarks that belong to the codebase
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Bookmark Studio: bookmarks that belong to the codebase

**[Mads Kristensen](https://daily.dev/sources/madskristensen)** · 7 min read · 0 upvotes · 0 comments

## Summary

Mads Kristensen describes the architecture behind Bookmark Studio, a Visual Studio extension that upgrades built-in bookmarks into named, color-coded, shareable navigation points. The piece walks through editor tag providers for glyphs and scrollbar markers, using ITrackingPoint to keep bookmarks anchored as code changes, building a native tool window via BaseToolWindow with VSCT-declared commands and search, intercepting Visual Studio's built-in bookmark commands, and a JSON storage format with personal, workspace, and global scopes. It closes with general lessons for extension authors: keep taggers cheap, use tracking points instead of raw line numbers, prefer native tool window chrome, define relative path bases explicitly, and centralize state behind a shared service.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.madskristensen.net/blog/building-bookmark-studio-bookmarks-that-belong-to-the-codebase>

## Questions this post answers

### How can I keep a bookmark or annotation anchored to the right line of code as a file is edited in Visual Studio?

Use the text editor's ITrackingPoint instead of storing a raw line number. While a document is open, anchoring a tracking point inside the line content lets the editor move it automatically as the buffer changes, so the marker stays attached to the intended code rather than a stale numeric line. Persisted storage should still fall back to the saved line number when no tracking point exists.

_daily.dev surfaces extension-development patterns like this for developers building editor tooling._

### What's a good approach for building a custom Visual Studio tool window that feels native instead of a look-alike control?

Host it as a BaseToolWindow registered with ProvideToolWindow, dock it alongside existing panes like Solution Explorer, and declare its toolbar and commands through VSCT rather than custom WPF chrome. Enabling SearchEnabled and implementing IVsSearchTask lets it reuse the host's native search box, giving familiar keyboard, accessibility, and toolbar customization behavior for free.

_Developers building Visual Studio extensions track these native-integration patterns on daily.dev._

## Similar posts on daily.dev

- [Bookmark Studio: evolving bookmarks in Visual Studio](https://daily.dev/posts/bookmark-studio-evolving-bookmarks-in-visual-studio-yqhkmleoa) · Visual Studio Blog · 2 upvotes · 0 comments
- [LocalMark Studio: A fast, local-first Markdown editor for real work.](https://daily.dev/posts/localmark-studio-a-fast-local-first-markdown-editor-for-real-work--wm2q88fn1) · Product Hunt · 93 upvotes · 6 comments
- [Visual Studio Code 1.119](https://daily.dev/posts/visual-studio-code-1-119-mv62hgw6d) · Visual Studio Code · 2 upvotes · 0 comments
- [TUIStudio — Design Terminal UIs. Visually.](https://daily.dev/posts/tuistudio-design-terminal-uis-visually--bddv1h9xg) · Hacker News · 15 upvotes · 1 comments
- [Visual Studio Code 1.138 \(Insiders\)](https://daily.dev/posts/visual-studio-code-1-138-insiders--cndyyup3t) · Visual Studio Code · 13 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#visual-studio](https://daily.dev/tags/visual-studio), [#wpf](https://daily.dev/tags/wpf)

[View this post on daily.dev](https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building Bookmark Studio: bookmarks that belong to the codebase","url":"https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p"},"datePublished":"2026-10-04T13:07:38.196Z","dateModified":"2026-10-04T13:16:15.527Z","description":"Mads Kristensen describes the architecture behind Bookmark Studio, a Visual Studio extension that upgrades built-in bookmarks into named, color-coded,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3343f86088f8b5002c4f83c47d42c634?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3343f86088f8b5002c4f83c47d42c634?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Mads Kristensen","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Mads Kristensen","logo":"https://media.daily.dev/image/upload/s--gtcmG3po--/f_auto,q_auto/v1791119055/logos/madskristensen?_a=BAMAMicg0","url":"https://daily.dev/sources/madskristensen"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,visual-studio,wpf","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Mads Kristensen","item":"https://daily.dev/sources/madskristensen"},{"@type":"ListItem","position":3,"name":"Building Bookmark Studio: bookmarks that belong to the codebase"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-bookmark-studio-bookmarks-that-belong-to-the-codebase-ia7isql1p#faq","mainEntity":[{"@type":"Question","name":"How can I keep a bookmark or annotation anchored to the right line of code as a file is edited in Visual Studio?","acceptedAnswer":{"@type":"Answer","text":"Use the text editor's ITrackingPoint instead of storing a raw line number. While a document is open, anchoring a tracking point inside the line content lets the editor move it automatically as the buffer changes, so the marker stays attached to the intended code rather than a stale numeric line. Persisted storage should still fall back to the saved line number when no tracking point exists. daily.dev surfaces extension-development patterns like this for developers building editor tooling."}},{"@type":"Question","name":"What's a good approach for building a custom Visual Studio tool window that feels native instead of a look-alike control?","acceptedAnswer":{"@type":"Answer","text":"Host it as a BaseToolWindow registered with ProvideToolWindow, dock it alongside existing panes like Solution Explorer, and declare its toolbar and commands through VSCT rather than custom WPF chrome. Enabling SearchEnabled and implementing IVsSearchTask lets it reuse the host's native search box, giving familiar keyboard, accessibility, and toolbar customization behavior for free. Developers building Visual Studio extensions track these native-integration patterns on daily.dev."}}]}
```

