function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Fernando Gonzalez 24Fernando Gonzalez 24 

VS Code SFDX - issue with 'Problems'.

When developing in VS Code - problems in apex code are only showing up after I try to deploy. And, if i get multiple problems i can't resolve them all without having to deploy for every problem. As soon as I correct one, the other problems disappear but as soon as I deploy again, the problems/errors in my apex code show up again.

Is there a setting I need to switch?
Is this a bug?
Is this an unintuitive feature?
Raj VakatiRaj Vakati
Can you share the error screenshot? That help us to comment on the issue .. 

 
Fernando Gonzalez 24Fernando Gonzalez 24
So I am parsing a WSDL file to Apex. When I generate the class (from a third party parser) and paste it into VS Code (into my sfdx project by creating a new class: sfdx create apex class) everything looks fine. There are no problems reported at this point. Next I go to deploy my class to source and that's when all of the problems appear. As soon as I correct just one problem (out of the many problems), the problems tab resets and it doesn't show anymore problems until i save and deploy again. So everytime I correct a problem i have to deploy again to see the rest of the problems because they're too many to memorize.

1. I deployed my class and of course deployment failed because of the errors:
At this point I get the underlined errors and a problem count (in the Problems tab).

problems_underlined
Underlined problems. 

problem_count
Problem count.

error_corrected
One (or in this case two) problem corrected

problem_count_gone
All problems gone.

more_errors_after_deployment
The rest of the errors show after I try to deploy again.


Note: The problem count went down significantly because the unknown type corrected appeared many times. This happens when correcting just a single problem also.
TejaPrakash1 DadiTejaPrakash1 Dadi
Was there any fix for this? I am experiencing the same problem. If I code in develepor console all the problems show up as soon as I hit save, but in vscode we have to deploy to show errors.