+ Start a Discussion
Ian Kang 1Ian Kang 1 

How to get error messages in Visual Studio Code? It used to tell why a deploy failed but not anymore

Hi team, 

When I code something and deploy to a sandbox, something it fails if I made a mistake or something doesn't work with the configuration of the sandbox.   When it fails, it used to give a details reason such as:
row 3 col 5 illegal assignment of String in Number field 

However, for some reason it stopped giving reasons but just the outcome
Now it just says DeployFailed: Deploy Failed

I am not sure if something change in CLI or I made a wrong setting. 
Can anyone please help?

Thanks!!
Best Answer chosen by Ian Kang 1
Tad Aalgaard 3Tad Aalgaard 3
Not sure what to tell you.  I updated all my extensions in my Visual Studio Code after seeing your post and I still receive deployment errors in the OUTPUT tab when I have Salesforce CLI selected on the right.  So, that should rule out a problem with the latest versions of the extension.  

Do as Khan indicated and make sure you update all your extensions and Visual Studio Code in case Summer 19 broke something with older version of their Extensions.

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Ian,

Greetings to you!

You can install extensions from the marketplace that will help you to find out the error and bugs.

https://marketplace.visualstudio.com/items?itemName=MohithShrivastava.dx-code-companion

https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-apex-debugger

https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode-apex

Try deploying via the CLI rather than VS Code to get better error messaging. Change directory to your project directory and run the following command:
sfdx force:source:deploy --sourcepath \force-app

Also, try to update Salesforce CLI using below command:
sfdx update

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Tad Aalgaard 3Tad Aalgaard 3
Not sure what to tell you.  I updated all my extensions in my Visual Studio Code after seeing your post and I still receive deployment errors in the OUTPUT tab when I have Salesforce CLI selected on the right.  So, that should rule out a problem with the latest versions of the extension.  

Do as Khan indicated and make sure you update all your extensions and Visual Studio Code in case Summer 19 broke something with older version of their Extensions.
This was selected as the best answer
Ian Kang 1Ian Kang 1
Below is the output I get when I deploy something with an error.
Starting SFDX: Deploy Source to Org

10:59:15.876 sfdx force:source:deploy --sourcepath /Users/iankang/Desktop/AutoLinkKpOrgToAcc/force-app/main/default/triggers/FindNLinkAcctWithKpOrgCreated.trigger --json --loglevel fatal
10:59:21.151 sfdx force:source:deploy --sourcepath /Users/iankang/Desktop/AutoLinkKpOrgToAcc/force-app/main/default/triggers/FindNLinkAcctWithKpOrgCreated.trigger --json --loglevel fatal ended with exit code 1

DeployFailed: Deploy failed.
I am wondering if it's because the log level is fatal?  If it is, how can make a default log level more detailed?
 
Ian Kang 1Ian Kang 1
Got this issue fixed, 

There was a bug with CLI and it is fixed in the new version 7.12.3

https://github.com/forcedotcom/salesforcedx-vscode/issues/1411
Astrologer Deepak SharmaAstrologer Deepak Sharma
Astrologer Deepak Sharma is a renowned & famous Astrological specialist, with over 21 years of experience in the field. 
https://lovelifesolution.com/get-your-ex-love-back (https://lovelifesolution.com/get-your-ex-love-back/)
https://lovelifesolution.com/
Krishnaram ShastriKrishnaram Shastri
 Meet Tantra Mantra Specialist Baba Ji krishnaram Shastri who has a rich experience in the field of Tantra Mantra astrology and has helped thousands of people by providing strong tantra mantra which no one can break.  
Astrologer Mk ShastriAstrologer Mk Shastri
Many People trusts Vashikaran specialist (https://mkshastri.com/vashikaran-specialist-babaji/) more nowadays. If you are facing stagnant raise in the growth chart, Husband and wife dispute, Love breakups etc… 
Pandit Anil ShastriPandit Anil Shastri
Love marriage problems - People fall in love, and they always want their marriage to be with their loved ones. Whom we have usually known as love marriage. 
Ken Koellner 7Ken Koellner 7
I upgraded -- 
 
sfdx-cli: Updating CLI from 7.112.1-b99fa53 to 7.114.0-5fe2863... done

I'm still getting no error details when I deploy.  Yes, I can go into the terminal window and run a command but that's much slower and more tedious.

This is what I get ---
Starting SFDX: Deploy Source to Org

16:21:39.168 sfdx force:source:deploy --sourcepath /Users/kkoellner/Documents/vscode/catdevOrg/force-app/main/default/classes/ctr_testEmail.cls --json --loglevel fatal
16:21:50.783 sfdx force:source:deploy --sourcepath /Users/kkoellner/Documents/vscode/catdevOrg/force-app/main/default/classes/ctr_testEmail.cls --json --loglevel fatal ended with exit code 1