I started to see for more than a month that problems caused by compilation are not displayed in VsCode (either in the Problems tab or highlighted on the source) nor the error message on Salesforce CLI Output.

I remember that I used to see that and I could find an old PR#717 that mentions this being delivered in 2018.

Have you experienced the same?

E.g. writing an apex class with a non-existing field.

List<Account> abc = [SELECT NonExistingCustomField__c from Account];

It only says that the command returned exit code 1, e.g.

20:58:45.397 sfdx force:source:deploy --sourcepath /myworkspace/force-app/main/default/apexClassWithError.cls --json --loglevel fatal
 ended with exit code 1

If you do the deploy command without the --json it says you the errors.

sfdx force:source:deploy --sourcepath /myworkspace/force-app/main/default/apexClassWithError.cls --loglevel fatal

Now the next question is how to automate it with the command palet of VSCode, and why it stopped working. Maybe is a temporary error again.

  • Hey Luisma, yes that is the workaround I have been using. Have you faced the same problem as well? Sep 3 at 11:31
  • 1
    Hi! Yes, I am facing same issue and some mates also are getting 'crazy' with this 'ended with exit code 1', with no success fixing it, so, to be honest, we will keep pushing trying to solve but we don't know if it's only a mini configuration issue or a bigger one! Thanks a lot for your question, it will save lot of time when it's really solved! Sep 4 at 11:36
  • I asked to reopen the GitHub issue, I hope Salesforce VsCode can fix it soon. Sep 4 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.