Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>C# Proto NavigationNew to Visual Studio Code? Get it now.
C# Proto Navigation

C# Proto Navigation

TechyChan

|
6 installs
| (0) | Free
Navigate from generated gRPC C# code to protobuf definitions
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C# Proto Navigation

Navigate seamlessly from generated gRPC C# code to protobuf definitions in VS Code.

Features

Automatically intercepts "Go to Definition" (F12/Ctrl+Click) in C# files and redirects to protobuf sources when appropriate.

Navigation Examples

  • Fields: request.UserId → UserRequest.user_id
  • Enums: Status.Active → STATUS_ACTIVE
  • Enum Prefixes: UserType.AdminUser → USER_TYPE_ADMIN_USER
  • RPC Methods: client.GetUserAsync → UserService.GetUser
  • Services: Grpc.User.UserClient → service UserService
  • Messages: UserRequest → message UserRequest

How It Works

  1. Intercepts all "Go to Definition" requests in C# files
  2. Delegates to C# language server first
  3. Detects if result points to generated files (.pb.cs, Grpc.cs, etc.)
  4. Inserts protobuf definition if found, otherwise returns or jump to original result

Benefits:

  • ✅ No interference with normal C# navigation
  • ✅ Leverages C#'s intelligence
  • ✅ Works in monorepos and complex projects

Installation

Install from VS Code Marketplace: TechyChan.csharp-proto-nav

Configuration

{
  "csharpProtoNav.enableDebugLogging": false,
  "csharpProtoNav.protoFilePatterns": ["**/*.proto"]
}

Requirements

  • VS Code 1.74.0+
  • Protobuf files in workspace

Architecture

Components

  • ProtoDefinitionProvider: Intercepts definition requests
  • ProtoCache: Indexes protobuf symbols for fast lookup
  • NameConverter: Handles C# ↔ protobuf name conversions

Generated File Detection

  • Paths: /obj/, /bin/, .pb.cs, Grpc.cs, .g.cs, .designer.cs

Name Conversions

  • PascalCase ↔ snake_case: UserId ↔ user_id
  • Enum values: Active → ACTIVE
  • Enum prefixes: UserType.Admin → USER_TYPE_ADMIN
  • Async methods: GetUserAsync → GetUser
  • gRPC services: Grpc.User.UserClient → UserService

Development

git clone https://github.com/TechyChan/csharp-proto-nav
cd csharp-proto-nav
npm install && npm run compile && npm run package
code --install-extension ./csharp-proto-nav-*.vsix --force

License

MIT License - see LICENSE.md

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