Skip to main content
MoxyCode deploys your Apex and LWC files directly to your Salesforce org from VS Code. When a deploy fails, MoxyCode opens the Deploy Errors panel automatically — ready to explain and fix every error without leaving your editor.

How to deploy

Right-click in the editor

Open any supported file in VS Code, right-click anywhere in the editor, and select MoxyCode: Deploy to Org.
MoxyCode: Deploy to Org in the editor right-click menu

Right-click in the Explorer panel

Right-click any supported file in the VS Code Explorer panel and select MoxyCode: Deploy to Org.
MoxyCode: Deploy to Org in the Explorer right-click menu

Command Palette

Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and run: MoxyCode: Deploy to Org

On success

When the deploy succeeds, MoxyCode shows a notification at the bottom of VS Code: “MoxyCode: Deployment successful!” No action needed — your code is live in the org.
MoxyCode deployment successful notification

On failure

When the deploy fails, MoxyCode shows a notification: “MoxyCode: n deployment error(s) found.” The MoxyCode — Deploy Errors panel opens automatically in a new tab with every error listed and ready to fix.
MoxyCode deployment error notification and Deploy Errors panel
Each new failed deploy resets the Deploy Errors panel with the latest errors. If the panel is already open from a previous deploy, it updates in place. If it was closed, it opens as a new tab.

Applying fixes

After generating fixes in the Deploy Errors panel, click Apply Fix. The button changes to Fix Applied and a notification appears: “MoxyCode: Fix applied — changed lines highlighted in green. Save to confirm.” Changed lines are highlighted in green in your editor. From the notification you can:
  • Click Save File to accept the changes
  • Click Undo Fix to revert immediately
MoxyCode fix applied notification with Save File and Undo Fix options
You can also use Cmd+Z / Ctrl+Z at any time to undo an applied fix.

How MoxyCode understands your code

MoxyCode doesn’t just read the file you deploy — it builds context from your wider codebase to give more accurate fixes.

LWC bundles

When you deploy any file in an LWC component folder, MoxyCode deploys the entire bundle and reads all files in that folder — the .js controller, .html template, .css styles, and .js-meta.xml. This means when fixing a JavaScript error, MoxyCode knows what the HTML template expects, and vice versa.
You can right-click any file in the LWC component folder to deploy the whole bundle — you don’t need to select a specific file.

Apex dependencies

When you deploy an Apex class, MoxyCode reads the classes it depends on. If your class calls another class, MoxyCode has context of that dependency when generating fixes — so suggestions are based on your actual codebase, not just the file being deployed.

Supported file types

MoxyCode supports deploying the following file types:
ExtensionType
.clsApex class (including batch classes)
.triggerApex trigger
.jsLWC JavaScript (deploys full bundle)
.htmlLWC HTML template (deploys full bundle)
XML metadata files (.xml) are not supported in this release. Only code files listed above can be deployed with MoxyCode.

Common issues

Make sure the active file is a supported type — .cls, .trigger, .js, or .html. MoxyCode only shows the deploy option for supported file types. If the option still doesn’t appear, run Developer: Reload Window from the Command Palette.
Make sure you are deploying to the correct org. Check your active Salesforce CLI default org by clicking the org name in the VS Code status bar. MoxyCode always deploys to whichever org is set as your CLI default.
MoxyCode only monitors deploys triggered via MoxyCode: Deploy to Org. If you used the Salesforce CLI directly or the SFDX commands, MoxyCode will not detect the errors. Use MoxyCode: Deploy to Org to get the automatic error panel.
Click Undo Fix in the notification that appears after applying a fix, or use Cmd+Z / Ctrl+Z in the editor at any time to revert the change.
LWC components deploy as a full bundle — all files in the component folder are deployed together. If another file in the bundle has an error, the deploy will fail even if you only changed one file. Check the Deploy Errors panel for the specific file and line causing the failure.

Fix Deployment Errors

Learn how to analyse and fix errors after a failed deploy

Safe Mode

Control when fixes are applied to your code