You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Problems section I am getting the warning "Variable is not visible: CustomerSurveyTH.forceException".
Yes, it is a private variable, but it has @testvisible annotation and is accessed from the test class, which is annotated with @isTest and the test method. So all is correct, and on save, the compiler is not showing an error as well as at runtime there are no errors.
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Hello @PawelWozniak 👋 It looks like you didn't provide all the required basic info in your issue.
If you haven't already, please provide the following info: Salesforce Extension Version in VS Code: Salesforce CLI Version: OS and version: VS Code version: Most recent version of the extensions where this was working:
Here's an example of a set of required info that will pass the validation: Salesforce Extension Version in VS Code: 60.13.0 Salesforce CLI Version: @salesforce/cli/2.42.6 darwin-arm64 node-v18.18.2 OS and version: MacOS Sonoma 14.5 VS Code version: 1.89.1 Most recent version of the extensions where this was working: 60.11.0
A few more things to check:
Make sure you've provided detailed steps to reproduce your issue, as well as all error messages that you see.
A repository that clearly demonstrates the bug is ideal.
Error messages can be found in the Problems Tab, Output Tab, and from running Developer: Toggle Developer Tools in the command palette.
Make sure you've installed the latest version of the Salesforce Extension Pack for VSCode. (docs)
Summary
I have a those lines in
CustomerSurveyTH
Then I have a code in
CustomerSurveyTH_Test
In the Problems section I am getting the warning "Variable is not visible: CustomerSurveyTH.forceException".
Yes, it is a private variable, but it has @testvisible annotation and is accessed from the test class, which is annotated with
@isTest
and the test method. So all is correct, and on save, the compiler is not showing an error as well as at runtime there are no errors.Steps To Reproduce:
Expected result
No errors as the code is compiling and running without issues.
Actual result
Getting a misleading error.
Additional information
Salesforce Extension Version in VS Code: 62.14.1
Salesforce CLI Version: @salesforce/cli/2.74.6 win32-x64 node-v22.13.1
OS and version: Windows 11
VS Code version: 1.96.4
Most recent version of the extensions where this was working: none.
The text was updated successfully, but these errors were encountered: