Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Test SnapNew to Visual Studio Code? Get it now.
Test Snap

Test Snap

Codecta

| (0) | Free
Instantly capture variables and parameters during debugging to generate unit tests with AI assistance.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Debug Catch: Copy Variables From Stack

Copy entry parameters and local variables from the current stack frame while debugging, directly from a hover on a function/method.

  • Hover during debug: Move the cursor over a function/method while a debug session is paused to see action links.
  • Copy all variables: Copies arguments and locals as JSON to your clipboard.
  • Copy entry params: Copies only the method/function parameters as JSON to your clipboard.

Requirements

  • VS Code ^1.83.0
  • A running debug session paused at a breakpoint (the extension works only when stopped in the debugger)

Usage

  1. Start debugging and pause on a breakpoint.
  2. Place the cursor on a function/method name.
  3. In the hover, click:
    • Copy all variables to copy arguments + locals
    • Copy entry params to copy only arguments
  4. Paste the JSON into your unit tests.

You can also run commands from the Command Palette:

  • Debug Catch: Copy All Variables For Current Method
  • Debug Catch: Copy Entry Parameters For Current Method

Settings

These settings control expansion depth and total items fetched from the debug adapter.

  • debugCatch.maxExpandDepth (number, default 2): How deep to recursively expand complex objects.
  • debugCatch.maxItems (number, default 200): Soft cap for number of variables/items expanded.

Note: Scopes are adapter-specific. This extension looks for scopes containing "args" for parameters and typical local scopes for variables.

Limitations

  • Actual variable names/scopes depend on the active debug adapter and language.
  • Complex values are serialized best-effort via the debug adapter string values. Some adapters may truncate or format values differently.
  • Very deep or very large objects are truncated using the settings above.

Development

  • Open this folder in VS Code.
  • Press F5 to run the extension in a new Extension Development Host.
  • Set breakpoints in extension.js for debugging the extension itself.

License

MIT

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