Skip to content

Commit bdbe63c

Browse files
fix: Address PR review feedback and add backlinks to VS Code extension docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fd4aa30 commit bdbe63c

File tree

12 files changed

+68
-69
lines changed

12 files changed

+68
-69
lines changed

contents/docs/getting-started/next-steps.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Read more about:
8989
- [Installing feature flags](/docs/feature-flags/installation) and [creating your first flag](/docs/feature-flags/creating-feature-flags)
9090
- [How we test in production](/product-engineers/testing-in-production) at PostHog using feature flags
9191
- [Best practices for using feature flags](/docs/feature-flags/best-practices) in your product
92+
- [VS Code extension](/docs/vscode-extension) — manage flags, see analytics, and clean up stale flags without leaving your editor
9293

9394
## 8. Try PostHog AI
9495

contents/docs/libraries/js/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import IdentifyFrontendCallout from '../../_snippets/identify-frontend-callout.m
3131

3232
<IdentifyFrontendCallout />
3333

34-
Once you've installed PostHog, see our [features doc](/docs/libraries/js/features) for more information about what you can do with it.
34+
Once you've installed PostHog, see our [features doc](/docs/libraries/js/features) for more information about what you can do with it. You can also install the [PostHog VS Code extension](/docs/vscode-extension) to see live analytics, flag status, and session replay links inline in your code.
3535

3636
### Track across marketing website &amp; app
3737

contents/docs/model-context-protocol/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ We're working on adding more supported tools to the wizard. If you're using anot
3333
- [Replit integration](/docs/integrations/replit): Set up PostHog with Replit Agent
3434
- [v0 integration](/docs/integrations/v0): Set up PostHog with v0 and the Vercel Flags SDK
3535
- [PostHog MCP server](https://github.com/PostHog/posthog/tree/master/services/mcp): Check out GitHub repository for the MCP server
36+
- [PostHog VS Code extension](/docs/vscode-extension): Inline analytics, flag management, and session replay links in your editor
3637
- [Model Context Protocol](https://modelcontextprotocol.io/introduction): Learn more about the Model Context Protocol specification
3738
- [MCP: machine/copy paste](/blog/machine-copy-paste-mcp-intro): What exactly is MCP again?

contents/docs/model-context-protocol/vscode.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import SharedContent from "./_snippets/shared.mdx"
88

99
The PostHog [MCP server](https://modelcontextprotocol.io/introduction) enables VS Code to directly interact with your PostHog data – managing feature flags, querying analytics, investigating errors, and more.
1010

11+
> **Note:** This is different from the [PostHog VS Code extension](/docs/vscode-extension), which provides inline analytics, flag management, and session replay links directly in your editor. They complement each other.
12+
1113
## Server URL
1214

1315
| Region | URL |

contents/docs/vscode-extension/_snippets/configuration-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Setting | Description | Default |
44
|---|---|---|
5-
| `posthog.additionalClientNames` | Additional variable names the extension should recognize as PostHog clients (e.g., `["analytics", "ph"]`) | `[]` |
5+
| `posthog.additionalClientNames` | Additional variable names the extension should recognize as instances of PostHog clients (e.g., `["analytics", "ph"]`) | `[]` |
66
| `posthog.additionalFlagFunctions` | Additional bare function names that accept a flag key as the first argument (e.g., `["useMyFlag"]`) | `[]` |
77
| `posthog.detectNestedClients` | Detect PostHog clients accessed via nested member expressions like `window.posthog?.capture()` | `true` |
88
| `posthog.showInlineDecorations` | Show inline annotations (sparklines, flag status) in the editor | `true` |

contents/docs/vscode-extension/flag-management.mdx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
2-
title: Flag management
2+
title: Flag management in the VS Code extension
33
sidebar: Docs
44
showTitle: true
5-
availability:
6-
free: full
7-
selfServe: full
8-
enterprise: full
95
---
106

117
The VS Code extension lets you create, toggle, edit, and manage [feature flags](/docs/feature-flags) without leaving your editor.
@@ -21,7 +17,7 @@ You can toggle a feature flag on or off from multiple places:
2117
A confirmation dialog appears before the change is applied to prevent accidental toggles. The change takes effect in PostHog immediately.
2218

2319
<ProductScreenshot
24-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_08_T00_01_21_431_Z_8c2c911a53.png"
20+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/pasted_image_2026_04_08_T00_01_21_431_Z_8c2c911a53.png"
2521
alt="PostHog VS Code extension showing feature flag state"
2622
classes="rounded"
2723
/>
@@ -47,7 +43,7 @@ When the extension detects a flag key in your code that doesn't exist in your Po
4743
This lets you write code with new flags first and create them in PostHog without switching context.
4844

4945
<ProductScreenshot
50-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_08_T00_02_16_887_Z_9563f497ce.png"
46+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_04_08_T00_02_16_887_Z_9563f497ce.png"
5147
alt="PostHog VS Code extension quick-fix to create a feature flag from an unrecognized key"
5248
classes="rounded"
5349
/>
@@ -72,9 +68,9 @@ Select a block of code, then use the context menu or command palette to **wrap i
7268

7369
## Other flag actions
7470

75-
| Action | How to access |
76-
|---|---|
77-
| **Copy flag key** | Right-click context menu, CodeLens, or `PostHog: Copy Flag Key` command |
78-
| **Open in PostHog** | CodeLens, sidebar, or `PostHog: Open in PostHog` command — opens the flag in your browser |
79-
| **Find all references** | `PostHog: Find Flag References` — searches your workspace for every usage of a flag key |
80-
| **View flag detail** | Click a flag in the sidebar or run `PostHog: Show Flag Detail` |
71+
| Action | How to access | Command |
72+
|---|---|---|
73+
| **Copy flag key** | Right-click context menu or CodeLens | `PostHog: Copy Flag Key` |
74+
| **Open in PostHog** | CodeLens or sidebar — opens the flag in your browser | `PostHog: Open in PostHog` |
75+
| **Find all references** | Searches your workspace for every usage of a flag key | `PostHog: Find Flag References` |
76+
| **View flag detail** | Click a flag in the sidebar | `PostHog: Show Flag Detail` |

contents/docs/vscode-extension/index.mdx

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,38 @@
22
title: VS Code extension
33
sidebar: Docs
44
showTitle: true
5-
availability:
6-
free: full
7-
selfServe: full
8-
enterprise: full
95
---
106

117
import ConfigurationReference from "./_snippets/configuration-reference.mdx"
128

139
The [PostHog VS Code extension](https://marketplace.visualstudio.com/items?itemName=PostHog.posthog-vscode) brings feature flags, experiments, event analytics, and session replay data directly into your editor. It works with JavaScript, TypeScript, Go and Ruby files (`.js`, `.jsx`, `.ts`, `.tsx`, `.go`, `.rb`).
1410

15-
With it, you can see live analytics data inline in your code, manage feature flags without leaving your editor, clean up stale flags with AST-based refactoring, and jump to session replays for events in your codebase.
11+
With it, you can see live analytics data inline in your code, [manage feature flags](/docs/vscode-extension/flag-management) without leaving your editor, [clean up stale flags](/docs/vscode-extension/stale-flag-cleanup) with AST-based refactoring, and [jump to session replays](/docs/vscode-extension/session-replay) for events in your codebase.
1612

1713
> **Note:** This extension is different from the [PostHog MCP server for VS Code](/docs/model-context-protocol/vscode), which enables AI agents and Copilot to interact with PostHog. The VS Code extension provides direct, visual tooling for developers in the editor. They complement each other.
1814
1915
## Installation
2016

21-
Install directly from your editor using these links:
17+
Install directly from your editor:
2218

23-
- [Install in VS Code](vscode:extension/PostHog.posthog-vscode)
24-
- [Install in Cursor](cursor:extension/PostHog.posthog-vscode)
19+
<Tab.Group tabs={['VS Code', 'Cursor']}>
20+
<Tab.List>
21+
<Tab>VS Code</Tab>
22+
<Tab>Cursor</Tab>
23+
</Tab.List>
24+
<Tab.Panels>
25+
<Tab.Panel>
26+
27+
[Install in VS Code](vscode:extension/PostHog.posthog-vscode)
28+
29+
</Tab.Panel>
30+
<Tab.Panel>
31+
32+
[Install in Cursor](cursor:extension/PostHog.posthog-vscode)
33+
34+
</Tab.Panel>
35+
</Tab.Panels>
36+
</Tab.Group>
2537

2638
Or install manually:
2739

@@ -31,27 +43,31 @@ Or install manually:
3143

3244
The extension is also available on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=PostHog.posthog-vscode) and the [Open VSX Registry](https://open-vsx.org/extension/PostHog/posthog-vscode).
3345

34-
![PostHog VS Code extension in the marketplace](https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/pasted_image_2026_04_07_T17_17_54_254_Z_0a1811dac8.png)
46+
<ProductScreenshot
47+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/pasted_image_2026_04_07_T17_17_54_254_Z_0a1811dac8.png"
48+
alt="PostHog VS Code extension in the marketplace"
49+
classes="rounded"
50+
/>
3551

36-
**Requirements:**
37-
- VS Code 1.109.0 or later
38-
- A PostHog account
52+
> **Requirements:**
53+
> - VS Code 1.109.0 or later
54+
> - A PostHog account
3955
4056
## Authentication
4157

4258
Once installed, authenticate the extension with your PostHog account:
4359

4460
1. Open the command palette (`Cmd+Shift+P` / `Ctrl+Shift+P`)
45-
2. Run **PostHog: Sign In**
61+
2. Run `PostHog: Sign In`
4662
3. Click the sign-in button — this opens PostHog in your browser where you authenticate via OAuth
4763
4. Once authenticated, run **PostHog: Select Project** to choose which project to connect to
4864

4965
After authenticating, the status bar at the bottom of VS Code shows your active project and last sync time.
5066

5167
<ProductScreenshot
52-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/pasted_image_2026_04_07_T17_30_26_682_Z_279700c593.png"
68+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_500,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T17_30_26_682_Z_279700c593.png"
5369
alt="PostHog VS Code extension sign-in flow"
54-
classes="rounded"
70+
classes="rounded max-w-md"
5571
/>
5672

5773
## Quick start
@@ -72,11 +88,13 @@ Once connected, the extension immediately starts analyzing your code:
7288

7389
For details on each feature, see:
7490

75-
- [Inline code intelligence](/docs/vscode-extension/inline-code-intelligence) — sparklines, flag status, autocomplete, and more
76-
- [Sidebar dashboard](/docs/vscode-extension/sidebar-dashboard) — flags, experiments, analytics, and X-ray tabs
77-
- [Flag management](/docs/vscode-extension/flag-management) — toggle, edit, create, and generate types for flags
78-
- [Stale flag cleanup](/docs/vscode-extension/stale-flag-cleanup) — find and remove outdated flag checks
79-
- [Session replay](/docs/vscode-extension/session-replay) — see session and user counts, jump to replays
91+
| Feature | Description |
92+
|---|---|
93+
| [Inline code intelligence](/docs/vscode-extension/inline-code-intelligence) | Sparklines, flag status, autocomplete, and more |
94+
| [Sidebar dashboard](/docs/vscode-extension/sidebar-dashboard) | Flags, experiments, analytics, and X-ray tabs |
95+
| [Flag management](/docs/vscode-extension/flag-management) | Toggle, edit, create, and generate types for flags |
96+
| [Stale flag cleanup](/docs/vscode-extension/stale-flag-cleanup) | Find and remove outdated flag checks |
97+
| [Session replay](/docs/vscode-extension/session-replay) | See session and user counts, jump to replays |
8098

8199
## Team configuration
82100

@@ -154,4 +172,3 @@ Open the command palette (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type "PostHog" to
154172
- [PostHog VS Code extension on GitHub](https://github.com/PostHog/posthog-vscode)
155173
- [PostHog MCP server for VS Code](/docs/model-context-protocol/vscode) — AI agent integration
156174
- [Feature flags documentation](/docs/feature-flags)
157-
- [Session replay documentation](/docs/session-replay)

contents/docs/vscode-extension/inline-code-intelligence.mdx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
2-
title: Inline code intelligence
2+
title: Inline code intelligence and annotations
33
sidebar: Docs
44
showTitle: true
5-
availability:
6-
free: full
7-
selfServe: full
8-
enterprise: full
95
---
106

117
The VS Code extension analyzes your source code in real time and overlays PostHog data directly in the editor. It detects PostHog SDK calls — `capture()`, `isFeatureEnabled()`, `getFeatureFlag()`, and others — and annotates them with live analytics, flag status, and contextual actions.
@@ -18,9 +14,9 @@ The extension automatically recognizes standard PostHog client patterns like `po
1814

1915
If your codebase wraps the PostHog client in a custom variable, configure the extension to recognize it:
2016

21-
- **`posthog.additionalClientNames`** — Add variable names like `["analytics", "ph"]` so the extension recognizes `analytics.capture()` the same way it recognizes `posthog.capture()`.
22-
- **`posthog.detectNestedClients`** — When enabled (default), detects nested member expressions like `window.posthog?.capture()` or `this.analytics.posthog.capture()`.
23-
- **`posthog.additionalFlagFunctions`** — Add bare function names like `["useMyFlag"]` that accept a flag key as the first argument. This is useful for custom hooks or wrapper functions.
17+
- `posthog.additionalClientNames` — Add variable names like `["analytics", "ph"]` so the extension recognizes `analytics.capture()` the same way it recognizes `posthog.capture()`.
18+
- `posthog.detectNestedClients` — When enabled (default), detects nested member expressions like `window.posthog?.capture()` or `this.analytics.posthog.capture()`.
19+
- `posthog.additionalFlagFunctions` — Add bare function names like `["useMyFlag"]` that accept a flag key as the first argument. This is useful for custom hooks or wrapper functions.
2420

2521
These settings can also be shared across your team via a [`.posthog.json` configuration file](/docs/vscode-extension#team-configuration).
2622

@@ -34,16 +30,17 @@ Next to every `isFeatureEnabled()`, `getFeatureFlag()`, or similar call, the ext
3430
- **Experiment status** if the flag is linked to an experiment, including win/loss/inconclusive results
3531

3632
<ProductScreenshot
37-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T17_58_55_239_Z_101e2ef8b0.png"
33+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T17_58_55_239_Z_101e2ef8b0.png"
3834
alt="PostHog VS Code extension feature flag status indicators"
3935
classes="rounded"
4036
/>
4137

4238
### Unrecognized flag keys
4339

4440
If you reference a flag key that doesn't exist in your PostHog project, the extension shows a **yellow underline warning**. You can use the quick-fix action to [create the flag directly from your editor](/docs/vscode-extension/flag-management#creating-flags-from-unrecognized-keys).
41+
4542
<ProductScreenshot
46-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T17_59_45_503_Z_1d9df5f0a8.png"
43+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T17_59_45_503_Z_1d9df5f0a8.png"
4744
alt="PostHog VS Code extension feature flag yellow indicator"
4845
classes="rounded"
4946
/>
@@ -53,7 +50,7 @@ If you reference a flag key that doesn't exist in your PostHog project, the exte
5350
Every `capture()` call in your code gets a **7-day event volume sparkline** displayed inline. This shows you at a glance how frequently each event fires, helping you identify dead events or unexpected spikes without leaving your editor.
5451

5552
<ProductScreenshot
56-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_20_30_804_Z_e9ee908672.png"
53+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_20_30_804_Z_e9ee908672.png"
5754
alt="PostHog VS Code extension event volume sparklines"
5855
classes="rounded"
5956
/>
@@ -74,7 +71,7 @@ When a feature flag is part of an experiment, the extension highlights the code
7471
The extension also shows the experiment results inline — whether a variant is winning, losing, or still inconclusive.
7572

7673
<ProductScreenshot
77-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_32_11_828_Z_bc3e910ebb.png"
74+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_32_11_828_Z_bc3e910ebb.png"
7875
alt="PostHog VS Code extension experiment variant highlighting"
7976
classes="rounded"
8077
/>
@@ -91,7 +88,7 @@ The extension provides IntelliSense autocomplete suggestions for:
9188
Suggestions are pulled from your PostHog project data, so they always reflect your actual flags and events.
9289

9390
<ProductScreenshot
94-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_33_07_051_Z_c3879cb578.png"
91+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_33_07_051_Z_c3879cb578.png"
9592
alt="PostHog VS Code extension autocomplete suggestions"
9693
classes="rounded"
9794
/>

contents/docs/vscode-extension/session-replay.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
---
2-
title: Session replay
2+
title: Session replays in the VS Code extension
33
sidebar: Docs
44
showTitle: true
5-
availability:
6-
free: full
7-
selfServe: full
8-
enterprise: full
95
---
106

11-
The VS Code extension connects your code to [session replay](/docs/session-replay) data, showing you how many sessions and users are triggering events and letting you jump directly to replays in PostHog.
7+
The VS Code extension connects your code to [Session Replay](/docs/session-replay) data, showing you how many sessions and users are triggering events and letting you jump directly to replays in PostHog.
128

139
## CodeLens session and user counts
1410

@@ -20,7 +16,7 @@ Above each `capture()` call and feature flag check in your code, the extension s
2016
These counts give you a quick sense of how actively a piece of code is being exercised in production, without needing to check PostHog separately.
2117

2218
<ProductScreenshot
23-
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_800,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_20_30_804_Z_e9ee908672.png"
19+
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/w_1000,c_limit,q_auto,f_auto/pasted_image_2026_04_07_T23_20_30_804_Z_e9ee908672.png"
2420
alt="PostHog VS Code extension event volume sparklines"
2521
classes="rounded"
2622
/>

contents/docs/vscode-extension/sidebar-dashboard.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
2-
title: Sidebar dashboard
2+
title: Sidebar dashboard in the VS Code extension
33
sidebar: Docs
44
showTitle: true
5-
availability:
6-
free: full
7-
selfServe: full
8-
enterprise: full
95
---
106

117
The extension adds a **PostHog panel** to the VS Code sidebar (activity bar), giving you a dashboard-like interface with tabs for feature flags, experiments, analytics, and code-level event analysis.

0 commit comments

Comments
 (0)