Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Copy Debug VariableNew to Visual Studio Code? Get it now.
Copy Debug Variable

Copy Debug Variable

Hào Đỗ

|
5 installs
| (2) | Free
Copy variable values during debugging sessions with support for all data types
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy Debug Variable 🚀

A powerful VS Code extension that allows you to copy debugger variable data quickly, accurately, and without element limits.

Why use this extension?

By default, when copying large arrays or objects in the VS Code Debugger, you often face:

  • Truncation: Only the first 25-50 elements are copied.
  • Slow Performance: Significant lag when traversing deeply nested objects.
  • Formatting Issues: Loss of Unicode characters or decimal precision.

Copy Debug Variable solves these problems using a Turbo Strategy (JSON Serialization).

Key Features

  • ⚡ Turbo Speed: Uses native language serialization to package data, allowing you to fetch 10,000+ elements in the blink of an eye.
  • 🌐 Multi-Language Support: Works perfectly on both .NET (C#) and JavaScript/TypeScript (Node.js, React, Chrome, etc.).
  • 💎 Original Data Integrity: Preserves decimal formatting (e.g., 2.0), supports Unicode (Vietnamese, Chinese, etc.), and handles special types.
  • 🛠 Smart Handling: Automatically manages circular references to prevent debugger crashes.
  • 📋 Flexible Formats: Supports copying as JSON or Plain Text.

Format Details:

  • JSON Format (Default):

    • Reconstructs objects into valid JSON strings.
    • Pretty-printed with indentation for readability.
    • Best for: Saving to .json files, creating mock data for APIs, or data analysis tools.
    • Preserves data types (numbers, booleans, arrays, nested objects).
  • Plain Text Format:

    • Removes JSON syntax (brackets, commas) to keep only the core content.
    • Uses indentation to represent the object hierarchy.
    • Best for: Documentation, sharing in chat (Slack/Teams/Discord) for quick review, or when you want to avoid JSON syntax noise.

How to Use

  1. While debugging, right-click on any variable in the Variables view.
  2. Select Copy Variable Value (for JSON) or Copy Variable Value (Plain Text).
  3. The data is now ready in your clipboard!

Requirements

  • For .NET (C#): Your project needs Newtonsoft.Json (most common) or System.Text.Json (default in .NET Core 3+).
  • For JavaScript/TypeScript: No extra requirements, works out of the box.

Configuration

You can customize the default format in Settings:

  • copyDebugVariable.format: json (default) or plain.

Developed by Hao Do. Happy Debugging! 💻✨

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