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

Salesforce Apex Code Runner

Joseph Allen

|
16,231 installs
| (2) | Free
Execute Apex scripts in a Salesforce project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Apex Code Runner

Apex Code Runner is a simple, fast and graceful tool for running .apex scripts within VS Code. This extension executes .apex scripts and returns cleaner results than the Salesforce Extensions Pack.

NOTES:

  • The Salesforce CLI Integration extension included in the Salesforce Extension Pack is required to run Apex Code Runner
  • Context menus will only work with files that have a .apex extension
  • The VS Code workspace MUST be a valid Salesforce project with an authenticated user
  • The extension is intended for execution of entire .apex file contents, NOT selected lines

Features

  • Executes Apex code
  • Returns CLEAN System.debug responses
  • Returns full debug log in a secondary output
  • Output panels refresh with each execution. No more scrolling of repetitive output

Clean User Debug Without the Clutter of a Full Debug Log

Speeds up development by showing only what you want.

Clean User Debug Without the Clutter of a Full Debug Log

Full Debug Log Too

Full Debug Log Too

Context Menu Where You Need It

Context Menu Where You Need It

Command Palette Menu When Needed

Command Palette When Needed

Requirements

The Salesforce CLI Integration extension included in the Salesforce Extension Pack is required to run this extension.

Extension Settings

This extension contributes the following settings:

  • apex-code-runner.logCategoryOptions: Apex log categories with their associated log levels. These only affect the level of detail in the full log output window.
    • Apex_code: Debug
    • Apex_profiling: Info
    • Callout: Info
    • Db: Info
    • System: Debug
    • Validation: Info
    • VisualForce: Info
    • Workflow: Info
  • apex-code-runner.preferredWindow: Output window to display when execution completes. You can view either at any time.
    • userDebug: (Default) Shows only system.debug statements (and errors)
    • fullLog: Shows the Full log will show the full log

Known Issues

N/A

Inspirational Projects

Here are some of the projects that were the primary inspiration and templates for this project

  • Salesforce Extensions for VS Code
  • ForceCode for Visual Studio Code
  • SalesforceDX Code Companion
  • @salesforce/core

Release Notes

See the CHANGELOG.md for current release notes and changes

Enjoy!

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