Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Samurai Agent - Visualize & Debug JS/TSNew to Visual Studio Code? Get it now.
Samurai Agent - Visualize & Debug JS/TS

Samurai Agent - Visualize & Debug JS/TS

Samurai Agent

|
55 installs
| (0) | Free
Debug JS/TS bugs other AI agents miss with automated runtime analysis: inspect real runtime variables and visualize execution paths to uncover silent bugs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🥋 Samurai Agent

AI debugging agent that debugs JavaScript/TypeScript bugs other AI coding agents miss

Samurai Agent executes your code to inspect real runtime variables and visualizes execution paths to uncover silent bugs.


🎥 See It In Action

Samurai Agent Demo

Watch full demo →


🚀 Join Our Private Beta

We're inviting JavaScript and TypeScript developers to help shape our beta product.
Join the private beta and get free credits via our landing page: samurai-agent.tech

Questions? Reach out on X: @yuto_samurai_ai


Why Samurai Agent?

The Problem

AI coding agents are great at writing code, but they struggle with debugging complex bugs—especially silent bugs. Most agents rely on static analysis or logs, which means they never see the actual runtime state of your program. Without ground-truth runtime variables, they often guess, miss edge cases, or fail to identify the real root cause.

This problem is even worse with AI-generated code, where execution flow and intent are hard to infer just by reading the code.


Our Solution

Samurai Agent debugs like a human developer.

It executes your JavaScript/TypeScript code, attaches debugger-level breakpoints, inspects real runtime variables, and iterates automatically until it finds where things went wrong. By focusing specifically on JavaScript and TypeScript, Samurai Agent can leverage language-specific debugging protocols to perform precise runtime analysis that general-purpose AI agents can’t.


What Makes Samurai Agent Different

  • Ground-truth runtime analysis
    Samurai Agent executes your code and inspects real runtime variable state instead of relying on logs or static guesses.

  • Visualization for understanding AI-generated code
    Samurai Agent visualizes execution paths, code graphs, and high-level concepts so you can understand what’s actually happening—even in large AI-generated codebases.

  • JavaScript & TypeScript–native
    Built specifically for JS/TS, enabling deeper runtime inspection and more accurate root-cause analysis than language-agnostic tools.


Roadmap

Samurai Agent currently supports static analysis and runtime analysis for Node.js. We’re actively working on expanding runtime debugging support to frontend environments as well.

Samurai Agent is in beta, and your feedback directly shapes its direction. We’re iterating quickly and appreciate any issues, ideas, or use cases you share.


⚡ Quick Start

📹 Watch Quick Start Tutorial →
📹 Watch Latest Demo Video →


Installation (2 minutes)

  1. Install the extension
    Search for “Samurai Agent” in the VS Code Marketplace and install it.

  2. Open Samurai Agent

    • Click the Samurai Agent chat icon in the VS Code sidebar, or
    • Press Cmd+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux), then type “Samurai Agent” and open it.
  3. Add your API key
    Open the Settings tab in Samurai Agent and add your API key from one of the following providers:

    • Gemini (recommended — fastest with Gemini Flash 2.5)
    • OpenAI
    • Anthropic

    💡 Join our private beta to receive free credits:
    👉 https://samurai-agent.tech/

  4. Start debugging

    • Open the Samurai Agent sidebar
    • Select suspicious code and click 💡 or add a file as context
    • Choose a model
    • Describe what’s going wrong and start analysis

Supported Environments

Samurai Agent works seamlessly with:

  • Node.js
  • React
  • Vue
  • Angular
  • Next.js
  • Express
  • Any JavaScript / TypeScript codebase

How to Use Samurai Agent

1. Add context

Samurai Agent works best when you provide the relevant code context.

You can add context in two ways:

  • Select code in VS Code, click 💡 and choose Add to Samurai Agent
  • Reference files directly by typing @mark followed by the file name in the chat input

Providing the right context helps Samurai Agent focus on the exact code path you want to debug.


2. Describe the bug

In the chat box, describe what’s going wrong in your code.

If you want Samurai Agent to perform runtime analysis, explicitly mention it in your request.
For example:

“This function is not working as expected. Please run runtime analysis and identify the root cause.”

Clear bug descriptions lead to more accurate analysis.


3. Let Samurai Agent analyze

Samurai Agent will:

  • Plan a debugging strategy
  • Locate and read relevant code
  • If needed (or explicitly requested), execute your code in a sandbox
  • Attach debugger-level breakpoints
  • Inspect real runtime variable state
  • Iterate automatically until the root cause is found

⚠️ Your code is never modified.
Samurai Agent runs analysis in an isolated sandbox using test scripts only.


4. Review the results

Once analysis is complete, Samurai Agent provides:

  • A root-cause explanation
  • Execution flow visualizations and code graphs
  • Conceptual diagrams explaining why the bug occurred

You can:

  • Click file names to open them directly
  • Click function or variable names to jump to the relevant code
  • Follow execution paths visually to understand complex or AI-generated code

5. Fix the bug

Samurai Agent focuses on root-cause analysis, not automatic code changes.

You can:

  • Copy the analysis into your preferred AI coding agent
  • Ask it to implement a fix based on the identified root cause
  • Use the explanation to manually apply a safe and confident fix

This workflow often results in more robust fixes than letting AI guess without runtime insight.


🔒 Privacy & Data

  • ✅ Your code stays private
    Samurai Agent analyzes your code locally and sends only the minimum required context to your chosen LLM provider. Your code and conversations are never used for training by Samurai Agent, and we do not modify or store your source code.

  • ✅ No chat content stored
    Samurai Agent does not store your chat messages or debugging conversations. We only collect anonymous usage events (e.g., “analysis started”) to improve product stability and performance.

  • ✅ You’re in full control
    Telemetry can be disabled at any time in the extension settings.

❓ FAQ

Does Samurai Agent modify my code?

No. Samurai Agent never edits your source code. All runtime analysis is performed in an isolated sandbox using test scripts only.

When should I use Samurai Agent?

Samurai Agent works best for:

  • Silent bugs where logs don’t explain what’s wrong
  • Complex async or state-related issues
  • AI-generated code that’s hard to reason about
  • Bugs that other AI coding agents fail to fix

When should I NOT use Samurai Agent?

Samurai Agent is not optimized for:

  • Simple syntax errors
  • Formatting or lint issues
  • One-line bugs with obvious stack traces

In those cases, traditional linters or AI code fixes are usually faster.

Does Samurai Agent replace AI coding agents like Cursor or Copilot?

No. Samurai Agent is complementary.

It focuses on root-cause analysis using runtime data. Many users copy the analysis into other AI coding tools to implement fixes more confidently.

Does Samurai Agent execute my code?

Yes — but only in a controlled sandbox environment. Your original files are never modified, and execution is limited to debugging purposes only.

Is my code or chat data used for training?

No.

Samurai Agent does not use your code or chat conversations for training. Your source code is never stored by Samurai Agent, and we do not retain debugging conversations.

Samurai Agent sends only the minimum required context to your selected LLM provider to perform analysis. Data handling and training policies then follow the terms of that provider (e.g., OpenAI, Google, Anthropic).


💬 Support & Feedback

  • Questions or issues? @yuto_samurai_ai
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft