Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Stack CodeNew to Visual Studio Code? Get it now.
Stack Code

Stack Code

Jonathan Bispo

|
2 installs
| (0) | Free
Track function call stacks across files while exploring codebases
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Stack Code

A VS Code extension for tracking function call flows across files while exploring unknown codebases. You manually "push" code selections onto named stacks to build a visual map of execution paths.

How it works

  • Stacks are named lists where you push selected code snippets in the order they'd execute.
  • Each pushed item records the file, line number, and original line content.
  • If the file is later edited and the line changes, the reference is marked as invalid (line changed) — the item stays in the stack but the navigation link is removed.
  • Click any valid reference in the panel to jump straight to that file and line.

Development

Prerequisites

  • Node.js >= 18
  • VS Code >= 1.74

Setup

cd /home/jfb01/stack-code
npm install
npm run compile      # one-off build
# or
npm run watch        # watch mode (rebuilds on save)

Run in development (Extension Development Host)

  1. Open the stack-code folder in VS Code:
    code /home/jfb01/stack-code
    
  2. Press F5 (or Run → Start Debugging).
    This opens a second VS Code window — the Extension Development Host — with the extension loaded.
  3. In the EDH window, open any project and use the extension.

Rebuild after changes

If running in watch mode (npm run watch), just reload the EDH window:
Ctrl+Shift+P → Developer: Reload Window.


Install (VSIX)

1. Package the extension

cd /home/jfb01/stack-code
npm install -g @vscode/vsce   # install the packaging tool once
npm run compile
vsce package                  # produces stack-code-0.0.1.vsix

2. Install the VSIX in VS Code

Option A — from the terminal:

code --install-extension /home/jfb01/stack-code/stack-code-0.0.1.vsix

Option B — from VS Code UI:
Extensions sidebar → ··· menu → Install from VSIX… → select the file.

Reload VS Code when prompted.


Uninstall

Option A — from the terminal:

code --uninstall-extension stack-code.stack-code

Option B — from VS Code UI:
Extensions sidebar → find Stack Code → gear icon → Uninstall.


Usage

Commands

Command Default keybinding Description
Stack Code: Create New Stack — Creates a new named stack
Stack Code: Push Selection to Stack Ctrl+Shift+K / Cmd+Shift+K Pushes selected text to a stack

The Push command is also available in the editor right-click context menu when text is selected.

The + icon in the Stacks panel header also triggers Create New Stack.

Workflow example

  1. Open the Stack Code panel in the Activity Bar (layers icon on the left).
  2. Click + or run Create New Stack → give it a name (e.g. login flow).
  3. In any file, select a function call or expression, then press Ctrl+Shift+K.
  4. Pick the stack from the dropdown.
  5. The item appears in the panel with a file:line link. Click it to jump back.
  6. Repeat for the next step in the call chain — items are shown in push order with arrows between them.
  7. Remove individual items with the ✕ on each item, or remove the whole stack with the ✕ on the stack header.

Data persistence

Stacks are stored in VS Code's workspace state (workspaceState), so they persist between sessions for the same workspace but are not shared across workspaces.

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