Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Polar Signals ProfilerNew to Visual Studio Code? Get it now.
Polar Signals Profiler

Polar Signals Profiler

Polar Signals

|
3 installs
| (0) | Free
View profiling data from Parca or Polar Signals Cloud directly in VS Code. See CPU, memory, and other profiling annotations inline with your source code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Polar Signals Profiler for VS Code

View profiling data from Parca or Polar Signals Cloud directly in VS Code with inline code annotations.

Features

  • 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

Installation & Development

Prerequisites

  • VS Code 1.85.0 or later
  • Node.js and pnpm

Setup

  1. Install dependencies:
cd vscode-extension
pnpm install
  1. Compile the extension:
pnpm run compile
  1. 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

Configuration

First-Time Setup

On first use, the extension will prompt you to choose a mode:

  1. Polar Signals Cloud: Uses OAuth to sign in with your Polar Signals account
  2. Self-hosted Parca: Connects to a local or remote Parca instance (no authentication)

Settings

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 []

Authentication (Cloud Mode)

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.

Usage

Quick Start with Presets

  1. Open a source file in VS Code
  2. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  3. Run: Polar Signals: Select Preset
  4. Choose a preset (e.g., "On-CPU (15min)")
  5. Profiling annotations appear inline in your code

Fetch Profile with Custom Query

  1. Open a source file in VS Code
  2. Open Command Palette
  3. Run: Polar Signals: Fetch Profile for Current File
  4. Configure the query (profile type, time range, labels)
  5. The extension fetches and displays profiling data

Deep Linking

  1. In Parca or Polar Signals Cloud, right click on any node in the flame graph or in the Source View (only in Polar Signals Cloud) and click on the "Open in VS Code" option.
  2. VS Code opens with profiling data for that file and line
  3. Make sure VS Code has the correct workspace open and is in focus so the extension can actually open the file in the correct context.

Import from URL

  1. Copy a URL from Parca or Polar Signals Cloud
  2. Run: Polar Signals: Import from URL
  3. Paste the URL
  4. The extension imports the query configuration

Commands

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

Built-in Presets

  • 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

Architecture

Components

  • Extension (extension.ts): Main entry point, registers commands
  • API Client (api/profiler-client.ts): Queries Parca/Polar Signals Cloud API
  • Settings (config/settings.ts): Manages dual-mode configuration and secrets
  • Setup Wizard (onboarding/setup-wizard.ts): First-use onboarding flow
  • Presets (presets/preset-definitions.ts): Built-in and user-defined query presets
  • Annotations (annotations/profiling-annotations.ts): Inline code decorations
  • Session Store (state/session-store.ts): Caches profiling data per file

Development

Watch Mode

Run TypeScript compiler in watch mode:

pnpm run watch

Testing

  1. Make code changes
  2. Press F5 in VS Code to launch Extension Development Host
  3. Test your changes in the new window
  4. Use Developer Tools (Help → Toggle Developer Tools) to debug

Troubleshooting

"No profiling data found"

  • 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

Connection errors (OSS mode)

  • Verify Parca is running at the configured URL
  • Check polarSignals.selfHostedUrl in settings
  • Ensure the URL uses the correct protocol (HTTP for localhost, HTTPS for remote)

Authentication errors (Cloud mode)

  • Try signing out and signing back in via Polar Signals: Sign Out from Polar Signals Cloud
  • Ensure you have access to the selected project

Extension not loading

  • Check VS Code version (must be 1.85.0+)
  • Run pnpm run compile to rebuild
  • Check the Output panel (View → Output → Polar Signals Profiler) for errors

License

Apache-2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft