View profiling data from Parca or Polar Signals Cloud directly in VS Code with inline code annotations.
- Dual-mode support: Connect to self-hosted Parca (OSS) or Polar Signals Cloud
- Inline annotations: See CPU time, memory allocations, and other metrics directly in your code
- Preset queries: Quick access to common profiling scenarios (On-CPU, Off-CPU, Memory, etc.)
- Deep linking: Open VS Code from Parca/Polar Signals Cloud.
- Session caching: Annotations persist as you navigate between files
On first use, the extension will prompt you to choose a mode:
- Polar Signals Cloud: Uses OAuth to sign in with your Polar Signals account
- Self-hosted Parca: Connects to a local or remote Parca instance (no authentication)
- Open a source file in VS Code
- Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
- Run: Polar Signals: Select Preset
- Choose a preset (e.g., "On-CPU (15min)")
- Profiling annotations appear inline in your code
- Open a source file in VS Code
- Open Command Palette
- Run: Polar Signals: Fetch Profile for Current File
- Configure the query (profile type, time range, labels)
- The extension fetches and displays profiling data
- Copy a URL from Parca or Polar Signals Cloud
- Run: Polar Signals: Import from URL
- Paste the URL
- The extension imports the query configuration
The extension supports the following settings (prefix: polarSignals.*):
| Setting | Description | Default |
|---|---|---|
polarSignals.mode |
Connection mode (cloud or oss) |
(set during setup) |
polarSignals.cloudUrl |
Polar Signals Cloud API URL | https://api.polarsignals.com |
polarSignals.selfHostedUrl |
Self-hosted Parca URL | http://localhost:7070 |
polarSignals.defaultTimeRange |
Default time range for queries | 1h |
polarSignals.profileType |
Default profile type | parca_agent:samples:count:cpu:nanoseconds:delta |
polarSignals.presets |
Custom query presets | [] |
polarSignals.autoFetchOnFileOpen |
Automatically fetch profiling data when opening a file | true |
polarSignals.autoScrollToAnnotation |
Automatically scroll to the first annotated line after fetching profiles | false |
polarSignals.autoScanOnMiss |
Automatically scan for git repositories when a deep link file isn't found | true |
For Polar Signals Cloud, the extension uses OAuth authentication. During setup, you'll be redirected to sign in with your Polar Signals account. Tokens are securely stored using VS Code's Secret Storage API.
| Command | Description |
|---|---|
Polar Signals: Fetch Profile for Current File |
Fetch profiling data with full configuration |
Polar Signals: Select Preset |
Quick fetch using a preset configuration |
Polar Signals: Quick Actions |
Show status bar menu with common actions |
Polar Signals: Import from URL |
Import query from a Parca or Polar Signals Cloud URL |
Polar Signals: Clear Profiling Annotations |
Remove all profiling annotations |
Polar Signals: Configure Defaults |
Open extension settings |
Polar Signals: Setup Mode |
Re-run the setup wizard to change mode |
Polar Signals: Sign Out from Polar Signals Cloud |
Sign out and remove stored credentials |
- On-CPU: CPU profile samples (15min, 1h, 24h)
- Off-CPU: Time spent waiting/blocked (15min, 1h)
- Memory Allocations: Memory allocations during time period
- Memory In-Use: Currently allocated memory
- Goroutines: Goroutine creation stack traces
- Mutex Contention: Time spent waiting on mutex locks
- Block Contention: Time spent blocked on synchronization
- VS Code 1.85.0 or later
- Node.js and pnpm
- Install dependencies:
cd vscode-extension
pnpm install- Compile the extension:
pnpm run compile- Test the extension:
- Open this directory in VS Code
- Press F5 to launch Extension Development Host
- In the new window, open a source file from your project
- On first use, a setup wizard will guide you through configuration
Run TypeScript compiler in watch mode:
pnpm run watch- Make code changes
- Press F5 in VS Code to launch Extension Development Host
- Test your changes in the new window
- Use Developer Tools (Help → Toggle Developer Tools) to debug
- Ensure the file you're viewing has profiling data
- Check that the time range includes data for this file
- Verify your query labels match the profiled application
- Verify Parca is running at the configured URL
- Check
polarSignals.selfHostedUrlin settings - Ensure the URL uses the correct protocol (HTTP for localhost, HTTPS for remote)
- Try signing out and signing back in via Polar Signals: Sign Out from Polar Signals Cloud
- Ensure you have access to the selected project
- Check VS Code version (must be 1.85.0+)
- Run
pnpm run compileto rebuild - Check the Output panel (View → Output → Polar Signals Profiler) for errors
Apache-2.0