Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Salesforce MDAPI DiffNew to Visual Studio Code? Get it now.
Salesforce MDAPI Diff

Salesforce MDAPI Diff

Ali AKil

|
14 installs
| (0) | Free
Professional Salesforce metadata comparison tool for VS Code. Compare individual files or entire folders against your Salesforce org. Features include single-file diff, folder diff with multiple tabs, and comprehensive metadata support. No telemetry. Org content stays in memory via virtual documents
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MDAPI Diff

Professional Salesforce metadata comparison tool for VS Code. Compare local MDAPI files with Salesforce org metadata instantly.

Features

  • Single File Diff: Right-click any metadata file to compare with org version
  • Folder Diff: Compare entire folders with multiple diff tabs opened automatically
  • Smart Caching: Reduces org access requests with intelligent caching
  • Whitespace-Aware: Optional whitespace-aware diff comparison
  • Private Files: Retrieved org files stay in memory - never written to disk
  • Backup Creation: Automatic backups when applying org changes
  • Error Recovery: Comprehensive retry mechanisms and error handling
  • Cancellation Support: Cancel long-running operations instantly with automatic cleanup
  • Resource Management: Bulletproof cleanup of temp files, processes, and virtual documents

Supported File Types

Supports all major Salesforce metadata types including:

  • Apex Classes (.cls)
  • Apex Triggers (.trigger)
  • Visualforce Pages (.page)
  • Lightning Components (.cmp, .app)
  • Custom Objects (.object)
  • Flows (.flow)
  • Permission Sets (.permissionset)
  • And many more...

Getting Started

  1. Install the extension
  2. Open a Salesforce project in VS Code
  3. Authenticate with your org: sf org login web
  4. Right-click any metadata file and select "MDAPI Diff"
  5. For folders: Right-click any folder and select "MDAPI Diff: Compare Folder with Org"

Requirements

  • Salesforce CLI installed and configured
  • Authenticated connection to at least one Salesforce org

Extension Settings

This extension contributes the following settings:

  • mdapiDiff.enabled: Enable/disable the extension
  • mdapiDiff.ignoreWhitespace: Ignore whitespace differences in diff view
  • mdapiDiff.orgCacheDuration: Cache duration for connected orgs
  • mdapiDiff.createBackups: Create backup files before applying changes
  • mdapiDiff.enableCancellation: Enable cancellation support (recommended)
  • mdapiDiff.logLevel: Set logging level (DEBUG, INFO, WARN, ERROR)

Commands

  • MDAPI Diff: Compare local file with org version (cancellable)
  • MDAPI Diff: Compare Folder with Org: Compare entire folder with multiple diff tabs
  • Select Salesforce Org: Choose which org to compare against
  • Refresh Connected Orgs: Refresh the list of available orgs

Cancellation Support

All long-running operations can be cancelled instantly:

  • Press ESC or click the cancel button in any progress notification
  • Immediate response: Operations stop within 1-2 seconds
  • Clean shutdown: All temporary files, processes, and virtual documents are cleaned up
  • No side effects: System returns to a clean state, ready for the next operation
  • Correlation tracking: Each operation gets a unique ID for troubleshooting

What Gets Cleaned Up

✅ External processes: Salesforce CLI commands are terminated
✅ Temporary directories: All .mdapi-diff/ folders are removed
✅ Package.xml files: Cleanup of generated metadata manifests
✅ Virtual documents: In-memory org content is disposed
✅ File handles: All open file streams are closed
✅ Backup staging: Incomplete backup operations are rolled back

Release Notes

1.0.5

Initial release with full Salesforce metadata comparison capabilities.


Enjoy comparing your Salesforce metadata! 🚀

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