npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

astro-openvscode-inspector

v1.5.0

Published

VSCode inspector integration for Astro DevToolbar - Open files directly from browser. Cross-platform support for Windows, macOS, and Linux

Readme

Astro VSCode Inspector

alt text A seamless integration between Astro's DevToolbar and VSCode that allows you to open files directly from your browser during development.

Features

  • 🎯 Click to open - Click on any component to open it in VSCode
  • 🖱️ Smart tooltip - Hover to see component information with beautiful floating tooltips
  • 🎨 Visual highlighting - Clear visual feedback when hovering over components
  • Automatic detection - Finds inspector elements up to 20 levels deep
  • 🔄 Auto-close - Inspector mode automatically closes after opening a file
  • 🌍 Cross-platform - Works on Windows, macOS, and Linux

Installation

# requirements
npm install @react-dev-inspector/babel-plugin vite 
npm install astro-openvscode-inspector

Dependencies

This package requires: vite @react-dev-inspector/babel-plugin

Usage

Add the integration to your astro.config.mjs:

import { defineConfig } from "astro/config";
import astroVSCodeInspector from "astro-openvscode-inspector";
import { loadEnv } from "vite";

const { PROJECT_FOLDER } = loadEnv(process.env.NODE_ENV, process.cwd(), "");

export default defineConfig({
  integrations: [
    react(
      isDev
        ? { babel: { plugins: ["@react-dev-inspector/babel-plugin"] } }
        : {},
    ),
    isDev && astroVSCodeInspector({ projectFolder: PROJECT_FOLDER }),
  ],
});

Environment Variables

Make sure to set the project folder path in your .env:

Windows:

PUBLIC_PROJECT_FOLDER=C:/Users/username/project
# or
PUBLIC_PROJECT_FOLDER=C:\\Users\\username\\project

macOS/Linux:

PUBLIC_PROJECT_FOLDER=/Users/username/project

The library automatically detects your operating system and handles path formatting correctly.

How it works

  1. Click the VSCode icon in the Astro DevToolbar
  2. Hover over components to see detailed tooltips with file information
  3. Click on any component to open the corresponding file in VSCode at the exact line
  4. Inspector mode automatically deactivates after opening a file

Platform Support

Windows - Fully supported with automatic path normalization
macOS - Fully supported with automatic OS detection
Linux - Fully supported

The library automatically detects your operating system and formats paths correctly for the vscode:// protocol handler.

Troubleshooting

VS Code doesn't open when clicking

  1. Make sure VS Code is installed and the code command is available
  2. Verify that PUBLIC_PROJECT_FOLDER is set correctly in your .env file
  3. Check browser console for error messages
  4. Ensure the path format matches your OS (see Environment Variables section)

Wrong file or path errors

  • Windows: Use forward slashes (C:/Users/...) or escaped backslashes (C:\\Users\\...)
  • macOS/Linux: Use absolute paths starting with / (e.g., /Users/... or /home/...)

Inspector not working

  • Make sure you have the @react-dev-inspector/babel-plugin installed and configured
  • Check that the integration is only enabled in development mode
  • Verify that your components have the inspector data attributes