Code Call Graph Visualizer
Add source files, get a layered call graph coloured by file, tap a function to see callers and callees, focus on one path and export the graph.
Działa w Twojej przeglądarce. Twoje pliki nigdy nie opuszczają urządzenia. Zobacz, jak to sprawdzić
…
Jak to zrobić
- 1Add files
Press Add files to load .js, .ts, .tsx or .py files, or paste code in the Files tab.
- 2Read the graph
Open Call graph; colours mark files and rows show call depth.
- 3Inspect a function
Tap a node to see its callers, callees and other calls.
- 4Focus
Choose a function and direction in the focus menu to trace one path.
- 5Check imports
Open Imports to see module dependencies between files.
- 6Export
Download SVG or copy DOT, Mermaid or JSON in the Export tab.
O tym narzędziu
When you inherit a codebase, the first question is usually "what calls this?". This visualiser reads JavaScript, TypeScript and Python files in your browser, finds the functions they define (function declarations, arrow functions assigned to constants, class methods and Python def blocks) and the calls inside each one, and draws a layered graph from entry points downwards. Each file has its own colour, recursion and cycles are drawn in red, and top-level code appears as its own node. Tap any function to list its callers, its callees and the library or built-in calls it makes, then focus the graph on everything it reaches or everything that reaches it.
Who it is for
Developers reviewing an unfamiliar module, reviewers checking the blast radius of a change, teachers explaining program structure, and anyone writing documentation who needs a quick diagram of how code fits together.
How the analysis works
Comments and string contents are blanked first, so a call written inside a comment or a log message is not counted. Function bodies are found by matching braces in JavaScript and TypeScript and by indentation in Python. A call is attributed to the innermost function that contains it. Names are matched against functions defined in the files you added: a call to fetchUser links to the fetchUser you loaded, while calls to things like fetch, console.log or requests.post are listed as other calls.
Reading the graph
- Rows are call depth from the entry points (functions nobody calls, and top-level code). - Grey arrows point from caller to callee; red dashed arrows point back up, meaning recursion or a cycle. - The list under the graph names functions that no loaded file calls: exported entry points, callbacks or possibly dead code.
Focus and filters
Choose a function in the focus menu and pick "What it calls" to see its whole downstream tree, or "What calls it" to trace every path that leads to it. Hide top-level code or show external calls under each node.
Imports
The Imports tab lists each file's import and require statements (or Python import and from … import lines) and highlights those that point at files you loaded, giving a quick module dependency view.
Export
Download the graph as SVG, or copy Graphviz DOT with one cluster per file, a Mermaid flowchart with subgraphs, or JSON with every function, line number and call list for your own tooling.
Worked example
The sample shop code has checkout.ts, cart.ts and payments.py. checkout calls getCart, sumTotal, validate, charge, clearCart and receipt; sumTotal calls lineTotal, and receipt calls formatLine. Focusing on checkout with "What it calls" shows three levels. Because names are matched across files, the TypeScript call charge links to the Python function of the same name, which shows how a name-based tool can over-connect.
Limits
This is a fast text-based analysis, not a compiler. It does not resolve types, so obj.save() links to any function called save, and dynamic calls (callbacks passed as values, getattr, eval) are not followed. Overloaded or duplicate names across files are joined to the first match. Use it as a map for reading code, not as proof that code is unused.
Przykład z rozwiązaniem
checkout → getCart, sumTotal → lineTotal, validate, charge, clearCart, receipt → formatLine (3 levels).
W skrócie
- Kategoria: Programowanie i dane
- Działa w przeglądarce, bez rejestracji i wysyłania.
- Wpisane informacje zostają na Twoim urządzeniu.
- Dostępne po angielsku.
- Treść ostatnio sprawdzona:
- Oficjalne źródło: Static call graph analysis of ECMAScript (ECMA-262) and Python function definitions and call expressions; Graphviz DOT output
Najczęstsze pytania
Which languages are supported?
JavaScript, TypeScript (including JSX and TSX) and Python files.
Is my code uploaded?
No. Files are read and analysed in your browser and saved only in its local storage.
How do I see who calls a function?
Tap it in the graph, or pick it in the focus menu with "What calls it".
Does it understand methods on objects?
It records obj.method() as a call to method and links it by name, without knowing the object's type.
Can I put the graph in documentation?
Yes: download SVG, or copy Mermaid for Markdown, or DOT for Graphviz.
Why is a used function listed as not called?
It may be called from a file you did not add, used as a callback or exported for other packages.
