Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Untangle — Import & Call TracerNew to Visual Studio Code? Get it now.
Untangle — Import & Call Tracer

Untangle — Import & Call Tracer

victor06-git

|
1 install
| (0) | Free
Your imports are spaghetti. Untangle them: see the full import tree and call hierarchy of any file or function, without jumping from file to file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Untangle logo

Untangle

Your imports are spaghetti. Untangle them.
See the full import tree and call hierarchy of any file or function, right in the VS Code sidebar.

VS Code Marketplace Open VSX CI License: MIT


Why

You open a file, see import { buildReport } from '@/services/report', jump there, find three more imports, jump again… and five tabs later you've forgotten why you started.

Untangle pulls the whole knot into one straight tree, so you can see the full chain at once and expand only what you need.

Languages

Import tree Call tree
JavaScript / TypeScript ✅ ✅
Python ✅ (new in 0.2) ✅ with a Python language server (e.g. Pylance)
Any other language — ✅ if its language server supports call hierarchy (Java, C#, Go, Rust, C/C++…)

Features

  • Import tree. Every local file a module imports, recursively.
    • JS/TS: ES import, export … from, dynamic import() and CommonJS require().
    • Python: import a.b, from . import x, from ..pkg import (…), imports inside functions and if TYPE_CHECKING: blocks. Works without any Python extension installed.
  • Call hierarchy. Outgoing calls (what does this function call?) and incoming calls (who calls it?), followed as deep as you want, in any language with a call-hierarchy language server.
  • Real module resolution.
    • JS/TS: uses the TypeScript compiler's own resolver, so tsconfig/jsconfig paths aliases (@/…, ~/…), baseUrl, index files and extends all work like they do in tsc. Solution-style configs (Vite, Nx) with references are supported too.
    • Python: mirrors how Python finds modules. A real package or module always wins over a plain folder without __init__.py, which is only used as a fallback, just like sys.path. It handles relative imports, .pyi stubs, the src/ layout and plain scripts next to each other. Standard-library and installed packages are marked as external.
  • Circular import detection. Cycles are flagged as ↻ knot detected instead of looping forever. Detection is per branch, so a shared file still shows up everywhere it's imported.
  • Jump to the exact line. Clicking a call opens the line where the call happens, not just the function definition.
  • Lazy and cached. Only the branch you expand gets analyzed. Results are cached per file and refreshed when you save or when a tsconfig changes.
  • English and Spanish UI.

Usage

  1. Open a JavaScript, TypeScript or Python file.
  2. Click the Untangle icon in the Activity Bar.
  3. Pick what to trace:
Command What it shows Shortcut
Untangle: Trace Imports Import tree of the current file (also in the Explorer right-click menu) Ctrl+Alt+Shift+I / Cmd+Alt+Shift+I
Untangle: Trace Outgoing Calls Everything the function under the cursor calls Ctrl+Alt+Shift+H / Cmd+Alt+Shift+H
Untangle: Trace Incoming Calls Everything that calls the function under the cursor —

The call commands are also in the editor's right-click menu.

Settings

Setting Default Description
untangle.showExternal false Also show imports and calls into external packages (node_modules, Python standard library and installed packages).

How it works

Layer Source Why
JS/TS imports TypeScript Compiler API: ts.preProcessFile + ts.resolveModuleName Fast lexical scan (no full AST), plus exactly the same resolution rules as tsc
Python imports Built-in parser and resolver (no Python install or extension needed) Tested against Python's own ast on 56,000+ real import statements and against importlib for resolution
Calls VS Code's built-in call hierarchy (vscode.prepareCallHierarchy, vscode.provideOutgoingCalls, vscode.provideIncomingCalls) Reuses the language server, which already understands overloads, this and re-exports, in any language

Known limitations

  • Barrel files (index.ts that re-exports everything) show up as a single node. Following the specific re-exported symbol is on the roadmap.
  • Python: imports built at runtime (importlib.import_module(name), __import__) and custom sys.path changes aren't followed. Absolute imports are looked up from the package root, the project root and src/.
  • Tree depth is capped at 12 levels to keep huge monorepos responsive. Past that point you'll see "Too tangled to go deeper".

Roadmap

  • [x] Python import tracing (0.2)
  • [ ] Interactive graph view (Webview) of the selected subtree
  • [ ] Follow symbols through barrel re-exports
  • [ ] Configurable max depth and folder filters
  • [ ] Import trees for more languages (Go, Rust, Java, C/C++)

Ideas and PRs welcome. See CONTRIBUTING.md.

License

MIT © Victor Asensio Bermúdez

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft