Skip to content

CatchMe

Exception Flow Explorer for Visual Studio Code.

Install from the Visual Studio Code Marketplace · Open VSX · Homepage

CatchMe answers two questions your editor normally leaves you guessing about:

  1. Where can this exception be caught? Right-click a throw and see every handler it can reach — including ones in callers, after it escapes the current function.
  2. What if I threw one here? Right-click anywhere, pick an exception type, and see where it would land. No code edits, no debugger.

Editors already highlight try/catch pairs within one function. The part nobody does — following an exception across function boundaries to the handler that actually catches it — is what this extension is for.

How it works

Exception semantics differ enormously between languages, but "who calls this function?" does not. CatchMe splits along exactly that line:

  • A language-agnostic core owns the UI and the interprocedural walk, which runs on standard LSP Call Hierarchy and therefore works for any language whose server implements it.
  • Pluggable providers own language semantics — what a throw is, and which handler catches which type.

Providers come in two tiers. A deep provider (Java, via Eclipse JDT running inside jdt.ls) has real type bindings and can answer definitively. A generic provider parses syntax only, so it answers possible — and the core structurally prevents it from claiming otherwise. Adding a language means writing a provider, not touching the core.

Repository layout

Path Contents
packages/ The TypeScript workspace — extension, provider API, providers, test kit
packages/api/ @leplusorg/catchme-api — the public provider contract
packages/core/ The Visual Studio Code extension itself
server-java/ The Eclipse JDT analyzer that runs inside jdt.ls (Maven/Tycho)
fixtures/ Annotated test projects, one per language

Each directory has its own README.md explaining the decisions behind it.

Getting started

pnpm install
pnpm build

Then press F5 — the Run Extension (with Java fixture) launch config opens fixtures/java in a development host.

To build the Java analyzer (needed for real Java results):

pnpm run build:server && pnpm run copy:server

This requires Maven; the wrapper belongs in server-java/. Without it, every other language still works through the generic provider — the Java provider simply reports that its backend is unavailable.

Requirements

Language Requirement Precision
Java Language Support for Java by Red Hat in Standard mode definite
Others The language's extension, if it implements LSP Call Hierarchy possible

Red Hat's Java extension is deliberately not a hard dependency, so non-Java users can install CatchMe without it.

Roadmap

More providers? C#, C/C++, Python (indent-based try/except)...

Concrete open work items live in Todo.md.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

Writing a provider for a new language? Start with packages/api/README.md and validate against @leplusorg/catchme-provider-testkit.

Security

Please read SECURITY.md for details on our security policy and how to report security vulnerabilities.

Code of Conduct

Please read CODE_OF_CONDUCT.md for details on our code of conduct.

License

This project is licensed under the terms of the LICENSE file.

About

Where does this exception actually get caught? A VS Code extension that traces the path from throw to handler across the call graph, hop by hop — with real type analysis.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages