Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Foundry Solidity Test RunnerNew to Visual Studio Code? Get it now.
Foundry Solidity Test Runner

Foundry Solidity Test Runner

jjeejj

|
57 installs
| (0) | Free
A powerful VSCode extension that enables developers to run and debug Foundry/Forge Solidity tests directly within the editor. It provides convenient CodeLens buttons next to each test method, allowing for quick execution and debugging of individual tests in Solidity files. Improves development workf
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Foundry Test Runner VSCode Extension

This VSCode extension provides integration support for the Foundry/Forge testing framework, allowing you to run and debug Solidity test files directly in the VSCode editor.

中文文档

Features

  • Display "run test" and "debug test" buttons next to Forge test methods
  • Run individual test methods with one click
  • Support for running tests in debug mode
  • Automatic detection of Forge test files and test methods

Feature Demo

Tip: The extension displays run and debug buttons next to test methods in Solidity test files, as shown above.

Requirements

  • VSCode 1.98.0 or higher
  • Foundry toolchain installed
  • Solidity project using Foundry/Forge as the testing framework

Installation

  1. Search for "Foundry Test Runner" in the VSCode extension panel
  2. Click install
  3. Restart VSCode

Usage

  1. Open a Solidity file containing Forge tests (usually ending with .t.sol)
  2. You will see "run test" and "debug test" buttons next to each test method
  3. Click the corresponding button to run or debug the test

Configuration

This extension contributes the following settings:

  • foundryTest.verbosityLevel: Set the verbosity level for forge test command (default: -vv)
  • foundryTest.additionalArgs: Additional arguments to pass to the forge test command
  • foundryTest.enableCodeLens: Enable or disable CodeLens buttons next to test methods (default: enabled)

Examples

The extension includes an example test file examples/Counter.t.sol that you can use to test the extension functionality.

Contributing

Issues and pull requests are welcome to the GitHub repository.

License

MIT

Version History

0.0.1

  • Initial version
  • Support for displaying run and debug buttons next to Forge test methods
  • Support for running individual test methods with one click

Enjoy!

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