How to enable compile on save on Visual Studio with sfdx-vscode plugin?

How to enable or configure “Salesforce Extensions for VS Code” plugin on Visual studio code IDE to compile my Apex,Visualforce on the scratch org when I save the file locally.

I have just started using it and I have to manually run the command sfdx force:source:push either from command prompt or from the command pallette in IDE.

Is there an easy option like we had in Mavensmate and Force IDE?

Update

I opened issue with salesforcedx-vscode project:

Answer

You can’t compile your code automatically like you did before with the first version of the Eclipse plugin. The new plugin makes use of the Language Server Protocole which will help you find errors locally, but you’ll still have to use sfdx force:source:push to compile everything.

If you have access to the Trailblazer Community, there is a thread about this here.

Additionally, you can automatically push your changes to your Scratch Org using Nodemon, as described in this blog post.

Attribution
Source : Link , Question Author : javanoob , Answer Author : Fabien Taillon

Leave a Comment