A Visual Studio Code extension that provides both Language Model Tools for AI agents and developer commands.
- What is this?
- Features
- Prerequisites
- Quick Start
- Installation & Setup
- Commands
- Language Model Tools
- Configuration
- Development
- Extensibility
VSC Toolbox is a collection of productivity tools for VS Code that includes:
-
Language Model Tools - Provides additional tools that AI agents can use to get extra context about the code base.
-
Developer Commands - Utility commands for common development tasks
- Copy File Name - Copy the current file's name to clipboard without any path
- Search Remote Code - Search selected text or word under cursor in configurable remote code search engines (Chromium Source, GitHub, etc.)
- Get WinDbg Breakpoint Location - Generate WinDbg breakpoint strings for methods or source lines
- Get GN Targets For File - Find which GN build targets (executables, libraries, etc.) a source file belongs to
- Test Language Model Tool - Test any registered Language Model Tool directly from the Command Palette without needing an AI agent
- getWorkspaceSymbol - Search for symbols (classes, functions, variables) across your entire codebase with fuzzy matching
- getDocumentSymbolReferences - Find all references to a symbol at a specific location
✅ Visual Studio Code (version 1.85.0 or higher)
✅ Node.js (version 24.x or higher) - Download here
Note: Node.js is only required to build the extension. End users installing a packaged
.vsixfile do not need Node.js.
If you prefer not to install Node.js system-wide, you can use it locally in a single PowerShell session. With this option, you'll need to run the PATH command each time you open a new PowerShell window, or add it to your PowerShell profile for persistence in your user account only.
# Download Node.js portable (Windows 64-bit) - Latest LTS version
Invoke-WebRequest -Uri "https://nodejs.org/dist/v24.11.0/node-v24.11.0-win-x64.zip" -OutFile "node.zip"
# Extract to a local folder and rename
Expand-Archive -Path "node.zip" -DestinationPath "."
Rename-Item "node-v24.11.0-win-x64" "node_local"
# Add to PATH for current session only
$env:Path = "$PWD\node_local;$env:Path"
# Verify installation
node --version
npm --version.\build.ps1# Install dependencies
npm install
# Compile the extension
npm run compile
# Press F5 in VS Code to launch Extension Development Host-
Clone this repository:
git clone https://github.com/pieths/vsc-toolbox.git cd vsc-toolbox -
Install dependencies:
npm install
This installs:
- Development:
@types/vscode,@types/node,typescript,eslint
- Development:
-
Compile the extension:
npm run compile
This creates the
out/directory with compiled JavaScript files. -
Test the extension:
- Open the project in VS Code (if not already open)
- Press
F5to launch Extension Development Host - Open any project or workspace preferrably one that has a language server configured
- Test the commands in the Command Palette to verify the extension is working
To create a .vsix file for distribution:
npx @vscode/vsce packageThen install it:
- Press
F1in VS Code - Select
Extensions: Install from VSIX... - Select the generated
.vsixfile
VSC Toolbox provides the following commands accessible from the Command Palette
(Ctrl+Shift+P or Cmd+Shift+P):
Command: VSC Toolbox: Copy File Name
Copies the current file's name (without path) to the clipboard.
Usage:
- Open any file
- Run the command
- File name is copied to clipboard
Command: VSC Toolbox: Search Remote Code
Search for selected text or word under cursor in configurable remote code search engines.
Features:
- If text is selected, uses the selection
- If no selection, uses the word under cursor
- Supports multiple search engines (configurable)
- Remembers last-used search engine per workspace
Usage:
- Select text or place cursor on a word/symbol
- Run the command
- Choose search engine (if multiple configured)
- Opens search results in browser
Configuration:
{
"vscToolbox.searchUrls": [
{
"name": "Chromium Source",
"url": "https://source.chromium.org/search?q=\"{query}\""
},
{
"name": "GitHub Code Search",
"url": "https://github.com/search?q={query}&type=code"
}
]
}Command: VSC Toolbox: Get WinDbg Breakpoint Location
Generate WinDbg-formatted breakpoint strings for the current code location.
Features:
- Method breakpoint: Creates breakpoint for current method with full namespace/class qualification
- Example:
chrome!media::MediaFoundationCdmModule::GetInstance
- Example:
- Source line breakpoint: Creates breakpoint for current file and line
- Example:
`chrome!D:\\cs\\src\\file.cc:323`
- Example:
Usage:
- Place cursor in a method or on a line
- Run the command
- Choose "Method" or "SourceLine"
- Breakpoint string is copied to clipboard
Configuration:
{
"vscToolbox.windbgModuleName": "chrome"
}Change "chrome" to your module name (e.g., "myapp").
Command: VSC Toolbox: Get GN Targets For File
Find which GN build targets a source file belongs to by querying the GN build system.
Features:
- Automatically detects available output directories in the
out/folder - Remembers your last-used output directory
- Supports filtering by target type (executable, shared_library, static_library, etc.)
- Displays results in a new editor window, sorted alphabetically
- For single results, automatically copies the target name to clipboard
- Shows the exact GN command that was executed
Usage:
- Open any source file in your workspace
- Run the command
- Select an output directory (e.g.,
release_x64,debug_x64) - Choose target type
- View results in the opened editor window
Requirements:
- GN build system must be available in your PATH
- An
out/directory with at least one build configuration - The file must be part of the GN build graph
Command: VSC Toolbox: Test Language Model Tool
Test any registered Language Model Tool directly from the Command Palette. This is useful for verifying tool output and debugging tools without needing to invoke them through an AI agent.
Features:
- Select from all registered Language Model Tools
- Provides appropriate input prompts based on the selected tool
- Displays tool output as formatted JSON in a new editor window
- Useful for development and debugging of new tools
Usage:
- Run the command
- Select which tool to test from the list
- Provide the required inputs (varies by tool)
- View the JSON results in the opened editor window
These tools are automatically available to AI agents like GitHub Copilot when the extension is active.
Once the extension is active, AI agents can use the following tools:
Search for symbols across the entire codebase.
Request Format:
{
"tool": "getWorkspaceSymbol",
"arguments": {
"query": "HttpRequest",
"filter": ["/src/net/", "/include/"]
}
}Parameters:
query(string, required): Symbol name to search for (supports fuzzy matching)filter(array of strings, optional): Path patterns to filter results
Response Format:
{
"query": "HttpRequest",
"totalResults": 15,
"filteredResults": 8,
"symbols": [
{
"name": "HttpRequest",
"kind": "Class",
"location": {
"uri": "file:///d:/cs/src/net/http/http_request.h",
"line": 23,
"character": 6
},
"containerName": "net::http"
}
]
}Find all references to a symbol at a specific location.
Request Format:
{
"tool": "getDocumentSymbolReferences",
"arguments": {
"uri": "file:///path/to/file.cpp",
"position": {
"line": 10,
"character": 5
}
}
}Parameters:
uri(string, required): File URIposition(object, required): Position object withlineandcharacter(both zero-based)
Response Format:
{
"uri": "file:///d:/cs/src/net/http/http_request.cc",
"position": {
"line": 42,
"character": 10
},
"totalReferences": 5,
"references": [
{
"uri": "file:///d:/cs/src/net/http/http_client.cc",
"range": {
"start": { "line": 15, "character": 8 },
"end": { "line": 15, "character": 19 }
}
}
]
}VSC Toolbox can be configured through VS Code settings. Access settings via File > Preferences > Settings or by editing .vscode/settings.json in your workspace.
{
"vscToolbox.enable": true
}Set to false to disable the extension.
Configure code search engines for the "Search Remote Code" command:
{
"vscToolbox.searchUrls": [
{
"name": "Chromium Source",
"url": "https://source.chromium.org/search?q=\"{query}\""
},
{
"name": "GitHub Code Search",
"url": "https://github.com/search?q={query}&type=code"
}
]
}The {query} placeholder is replaced with the selected text (URL-encoded).
Set the module name prefix for WinDbg breakpoints:
{
"vscToolbox.windbgModuleName": "chrome"
}Change to match your module ("myapp", etc.).
npm run compile # Compile once
npm run watch # Watch mode (auto-compile on change)
npm run lint # Run ESLintIf you need to debug the extension in a VS Code instance launched from a specific command-line environment (e.g., with custom environment variables), follow these steps:
One-time setup: Create a symbolic link for the extension directory (may require administrator PowerShell):
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.vscode\extensions\vsc-toolbox-dev" -Target "d:\tools\vsc-toolbox"Each time you debug: Launch VS Code from the command line with inspection enabled:
code --inspect-extensions=5870 .Attach the debugger: In the VS Code instance with the vsc-toolbox workspace
open, select the Attach to VS Code with Environment debug configuration and
press F5 to start debugging.
When finished with debugging and testing the changes, the symbolic link can be removed with:
Remove-Item "$env:USERPROFILE\.vscode\extensions\vsc-toolbox-dev"
vsc-toolbox/
├── .vscode/
│ ├── launch.json # Debug configuration (F5)
│ ├── tasks.json # Build tasks
│ └── settings.json # Workspace settings
├── src/
│ ├── extension.ts # Extension entry point (activate/deactivate)
│ ├── commands/ # Command Palette commands
│ │ ├── index.ts # Command registry
│ │ ├── getFileName.ts # Copy file name command
│ │ ├── searchRemoteCode.ts # Code search command
│ │ └── getWinDbgBreakpointLocation.ts # WinDbg breakpoint command
│ └── tools/ # Language Model Tools (for AI)
│ ├── index.ts # Tool registry
│ ├── getWorkspaceSymbol.ts # Workspace symbol tool
│ └── getDocumentSymbolReferences.ts # References tool
├── out/ # Compiled JavaScript (generated)
├── node_modules/ # Dependencies (generated)
├── package.json # Extension manifest and dependencies
├── tsconfig.json # TypeScript configuration
├── .vscodeignore # Files to exclude from .vsix package
└── .gitignore # Git ignore patterns
Commands appear in the Command Palette and can be invoked by users.
Create a new file in src/commands/ (e.g., src/commands/myCommand.ts):
// Copyright (c) 2025 Piet Hein Schouten
// SPDX-License-Identifier: MIT
import * as vscode from 'vscode';
export class MyCommand {
public readonly id = 'vscToolbox.myCommand';
public readonly title = 'VSC Toolbox: My Command';
constructor(private context: vscode.ExtensionContext) {}
async execute(): Promise<void> {
const editor = vscode.window.activeTextEditor;
if (!editor) {
vscode.window.showWarningMessage('No active editor');
return;
}
// Your command logic here
vscode.window.showInformationMessage('Command executed!');
}
}Add your command to src/commands/index.ts:
import { GetFileNameCommand } from './getFileName';
import { SearchRemoteCodeCommand } from './searchRemoteCode';
import { GetWinDbgBreakpointLocationCommand } from './getWinDbgBreakpointLocation';
import { MyCommand } from './myCommand'; // Add import
export const COMMAND_REGISTRY = [
GetFileNameCommand,
SearchRemoteCodeCommand,
GetWinDbgBreakpointLocationCommand,
MyCommand, // Add to registry
] as const;{
"contributes": {
"commands": [
{
"command": "vscToolbox.myCommand",
"title": "My Command",
"category": "VSC Toolbox"
}
]
}
}That's it! The command will be automatically registered and available in the Command Palette.
Tools are used by AI agents like GitHub Copilot to query your codebase and perform other actions.
Create a new file in src/tools/ (e.g., src/tools/myNewTool.ts):
import * as vscode from 'vscode';
export interface IMyNewToolParams {
// Define your tool's input parameters
someParam: string;
}
export class MyNewTool implements vscode.LanguageModelTool<IMyNewToolParams> {
constructor() { }
async prepareInvocation(
options: vscode.LanguageModelToolInvocationPrepareOptions<IMyNewToolParams>,
_token: vscode.CancellationToken
): Promise<vscode.PreparedToolInvocation> {
return {
invocationMessage: `Running my new tool...`,
confirmationMessages: {
title: 'My New Tool',
message: new vscode.MarkdownString(`Execute my new tool?`),
},
};
}
async invoke(
options: vscode.LanguageModelToolInvocationOptions<IMyNewToolParams>,
_token: vscode.CancellationToken
): Promise<vscode.LanguageModelToolResult> {
const { someParam } = options.input;
// Use VS Code commands to interact with language servers
// Example: vscode.commands.executeCommand('vscode.executeDefinitionProvider', ...)
const result = { /* your result data */ };
return new vscode.LanguageModelToolResult([
new vscode.LanguageModelTextPart(JSON.stringify(result, null, 2)),
]);
}
}Add your tool to src/tools/index.ts:
import { GetWorkspaceSymbolTool } from './getWorkspaceSymbol';
import { GetDocumentSymbolReferencesTool } from './getDocumentSymbolReferences';
import { MyNewTool } from './myNewTool'; // Add import
export const TOOL_REGISTRY = [
{ name: 'getWorkspaceSymbol', class: GetWorkspaceSymbolTool },
{ name: 'getDocumentSymbolReferences', class: GetDocumentSymbolReferencesTool },
{ name: 'my_new_tool', class: MyNewTool }, // Add to registry
] as const;Add your tool's configuration to the languageModelTools array in package.json:
{
"name": "my_new_tool",
"displayName": "My New Tool",
"canBeReferencedInPrompt": true,
"toolReferenceName": "my-new-tool",
"userDescription": "Brief description for users",
"modelDescription": "Detailed description for AI models about what the tool does and when to use it",
"inputSchema": {
"type": "object",
"properties": {
"someParam": {
"type": "string",
"description": "Description of the parameter"
}
},
"required": ["someParam"]
}
}That's it! The tool will be automatically registered when the extension activates.
See the VS Code Commands API for available commands.
Quick Links: